Commit 5a036a97 authored by Célestin Marot's avatar Célestin Marot
Browse files

ultimate makefile

parent 98fe486b
......@@ -12,20 +12,15 @@ EXE=$(BINDIR)/test
SRC=$(wildcard $(SRCDIR)/*.c)
# all:
# @echo $(EXE)
# @echo $(SRC)
# @echo $(OBJ)
$(EXE): $(OBJ) | $(BINDIR)
$(CC) -o $@ $^ $(LDFLAGS)
$(OBJDIR)/predicates.o: $(SRCDIR)/predicates.c $(SRCDIR)/predicates.h
$(OBJDIR)/test.o: $(SRCDIR)/test.c $(SRCDIR)/HXTSPR.h
# additional dependencies to other header files
$(OBJDIR)/predicates.o: $(SRCDIR)/predicates.h
$(OBJDIR)/HXTSPR.o: $(SRCDIR)/HXTSPR.h $(SRCDIR)/predicates.h
$(OBJDIR)/test.o: $(SRCDIR)/HXTSPR.h
$(OBJ): | $(OBJDIR)
$(OBJ): $(OBJDIR)/%.o: $(SRCDIR)/%.c | $(OBJDIR)
# @echo $@ depends on $^
$(CC) $(CFLAGS) -o $@ -c $< $(LDFLAGS)
......@@ -41,4 +36,4 @@ help:
rm -r .cache
.PHONY: all help clean
.PHONY: help clean
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment