1

Here is my makefile, until today I never try to use OS detection in it. Mine looks like this :

CC = gcc CFLAGS = -Wall -Wextra -O1 -Wuninitialized OUT = project.exe ifeq ($(UNAME),Darwin) #Mac OS echo "Darwin" SRC = sdl_gui.c libSDLextra.c libImageProcessing.c SDLmain.m OBJ = sdl_gui.o libSDLextra.o libImageProcessing.o SDLmain.o LIBS = -I /Library/Frameworks/SDL.framework/Headers -framework SDL -I /Library/Frameworks/SDL_ttf.framework/Versions/A/Headers -framework SDL_ttf -framework Cocoa endif ifeq ($(UNAME),Linux) #Linux based systems SRC = sdl_gui.c libSDLextra.c libImageProcessing.c OBJ = sdl_gui.o libSDLextra.o libImageProcessing.o LIBS = -lSDL -lSDL_ttf endif all : $(OUT) $(OUT) : $(OBJ) $(CC) $(CFLAGS) $(OBJ) -o $(OUT) $(OBJ) : $(SRC) $(CC) $(CFLAGS) -c $(SRC) clean : rm -f $(OBJ) $(OUT) 

When I do make I've got this error :

gcc -Wall -Wextra -O1 -Wuninitialized -o projet.exe clang: error: no input files make: *** [projet.exe] Error 1 

I understand the error but I don't know how to fix it.

0

1 Answer 1

1

It looks like you are missing this from (near) the top of the file:

UNAME := $(shell uname) 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.