Rework Makefile dependencies

This commit is contained in:
Grégory Soutadé 2016-02-24 19:17:40 +01:00
parent 087082ef08
commit ad33c94c6f

View File

@ -21,14 +21,14 @@ all: $(BIN_DIR) ip_data.c $(TARGET)
$(BIN_DIR): $(BIN_DIR):
@mkdir $(BIN_DIR) @mkdir $(BIN_DIR)
ip_data.c: ip_data.c: $(BIN_DIR)
make -C ../data make -C ../data
cmdline.c: cmdline.ggo cmdline.c: cmdline.ggo
gengetopt --input $^ gengetopt --input $^
$(TARGET): $(SRCS) $(TARGET): ip_data.c $(SRCS)
gcc $(CFLAGS) $^ $(LDFLAGS) -o $@ gcc $(CFLAGS) $(SRCS) $(LDFLAGS) -o $@
clean: clean:
rm -f *~ $(TARGET) rm -f *~ $(TARGET)