diff options
Diffstat (limited to 'src/prog.mk')
-rw-r--r-- | src/prog.mk | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/prog.mk b/src/prog.mk index 87e1806a8..debdf3572 100644 --- a/src/prog.mk +++ b/src/prog.mk | |||
@@ -5,18 +5,18 @@ | |||
5 | # The includer should probably define PROG and TARGET and may also want to | 5 | # The includer should probably define PROG and TARGET and may also want to |
6 | # define EXTRA_HDRS and EXTRA_OBJS and extend CLEANFILES. | 6 | # define EXTRA_HDRS and EXTRA_OBJS and extend CLEANFILES. |
7 | 7 | ||
8 | HDRS := $(sort $(wildcard $(MOD_DIR)/*.h)) $(EXTRA_HDRS) | 8 | HDRS := $(sort $(wildcard $(MOD_DIR)/*.h)) |
9 | SRCS := $(sort $(wildcard $(MOD_DIR)/*.c)) | 9 | SRCS := $(sort $(wildcard $(MOD_DIR)/*.c)) |
10 | OBJS := $(SRCS:.c=.o) $(EXTRA_OBJS) | 10 | OBJS := $(SRCS:.c=.o) |
11 | 11 | ||
12 | .PHONY: all | 12 | .PHONY: all |
13 | all: $(TARGET) | 13 | all: $(TARGET) |
14 | 14 | ||
15 | %.o : %.c $(HDRS) $(ROOT)/config.mk | 15 | %.o : %.c $(HDRS) $(EXTRA_HDRS) $(ROOT)/config.mk |
16 | $(CC) $(PROG_CFLAGS) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ | 16 | $(CC) $(PROG_CFLAGS) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ |
17 | 17 | ||
18 | $(PROG): $(OBJS) $(ROOT)/config.mk | 18 | $(PROG): $(OBJS) $(EXTRA_OBJS) $(ROOT)/config.mk |
19 | $(CC) $(PROG_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) | 19 | $(CC) $(PROG_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRA_OBJS) $(LIBS) |
20 | 20 | ||
21 | .PHONY: clean | 21 | .PHONY: clean |
22 | clean:; rm -fr $(PROG) $(CLEANFILES) | 22 | clean:; rm -fr $(PROG) $(CLEANFILES) |