Refactor makefile to include SRCS

This commit is contained in:
Pim van Pelt
2017-11-26 10:57:49 +01:00
parent a42ba88db7
commit caed302f2f

View File

@ -9,7 +9,8 @@ INCLUDE = ../include
default: $(TARGET)
all: default
OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c)) frozen/frozen.o
OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c))
SRCS = frozen/frozen.c
HEADERS = $(wildcard *.h)
%.o: %.c $(HEADERS)
@ -18,7 +19,7 @@ HEADERS = $(wildcard *.h)
.PRECIOUS: $(TARGET) $(OBJECTS)
$(TARGET): $(OBJECTS)
$(CC) $(CFLAGS) -I$(INCLUDE) $(OBJECTS) $(LIBS) -o $@
$(CC) $(CFLAGS) -I$(INCLUDE) $(OBJECTS) $(LIBS) $(SRCS) -o $@
clean:
-rm -f $(OBJECTS)