first commit
This commit is contained in:
25
Makefile
Normal file
25
Makefile
Normal file
@@ -0,0 +1,25 @@
|
||||
TARGET ?= VowelOrConsonant
|
||||
CC ?= gcc
|
||||
|
||||
PREF_SRC = ./src/
|
||||
PREF_OBJ = ./obj/
|
||||
|
||||
SRC = $(wildcard $(PREF_SRC)*.c)
|
||||
OBJ = $(patsubst $(PREF_SRC)%.c, $(PREF_OBJ)%.o, $(SRC))
|
||||
|
||||
$(TARGET) : $(OBJ)
|
||||
$(CC) $(OBJ) -o $(TARGET)
|
||||
|
||||
depend: .depend
|
||||
|
||||
.depend: $(SRC)
|
||||
rm -f "$@"
|
||||
$(CC) -MM $^ > "$@"
|
||||
|
||||
-include .depend
|
||||
|
||||
$(PREF_OBJ)%.o : $(PREF_SRC)%.c
|
||||
$(CC) -c $< -o $@ -D_PROG_NAME=\"$(TARGET)\"
|
||||
|
||||
clean :
|
||||
rm $(TARGET) $(PREF_OBJ)*.o *.d
|
||||
Reference in New Issue
Block a user