Loading Makefile.common +10 −5 Original line number Diff line number Diff line Loading @@ -86,21 +86,26 @@ else MWCFLAGS += -O0 -Werror endif ### The magic which lets us autogenerate dependencies CFLAGS = $(MWCFLAGS) -MMD LDFLAGS = $(MWLDFLAGS) # Let the user add some flags at the end CFLAGS_APPEND = CFLAGS = $(MWCFLAGS) $(CFLAGS_APPEND) LDFLAGS = $(MWLDFLAGS) CODE=$(wildcard *.c) HDRS=$(wildcard *.h) all: build # Using -MMD -MF <filename> outputs make rules for the required .o into # <filename> with automatically generated dependencies on the .c file and the # local headers included by the .c file %.o: %.c $(CC) $(CFLAGS) $(CFLAGS_APPEND) -c -o $@ $< $(CC) $(CFLAGS) -MMD -MF .$(@:.o=.d) -c -o $@ $< -include $(CODE:.c=.d) # The generated rule for the requested .o file is then included, dependencies # are checked and the rule is executed without the -M* options. -include $(CODE:%.c=.%.d) $(JSOBJ): $(MAKE) -C $(SRCROOT)/mozjs libdir=/usr/lib Loading src/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ install: all install -d $(DESTDIR)$(STATEDIR) clean: -rm -f *.o *.d nonce-def.h mw mwserv libmw.a -rm -f *.o *.d .*.d nonce-def.h mw mwserv libmw.a cleanall: clean $(MAKE) -C client clean Loading src/client/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ install: mw install -D mw $(DESTDIR)$(bindir)/mw clean: -rm -f *.o *.d mw -rm -f *.o .*.d *.d mw ifndef TESTDIR test: Loading src/server/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ mwserv: $(CODE:.c=.o) ../libmw.a $(JSOBJ) $(CC) $(LDFLAGS) $(LDLIBS) -o $@ $^ clean: -rm -f *.o *.d mwserv -rm -f *.o .*.d *.d mwserv install: mwserv install -D mwserv $(DESTDIR)$(HOMEPATH)/mwserv Loading src/utils/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -22,4 +22,4 @@ sizes: sizes.o $(CC) $(LDFLAGS) $(LDLIBS) -o $@ $^ clean: rm -f *.o *.d listuser fixuser del_user sizes rm -f *.o .*.d *.d listuser fixuser del_user sizes Loading
Makefile.common +10 −5 Original line number Diff line number Diff line Loading @@ -86,21 +86,26 @@ else MWCFLAGS += -O0 -Werror endif ### The magic which lets us autogenerate dependencies CFLAGS = $(MWCFLAGS) -MMD LDFLAGS = $(MWLDFLAGS) # Let the user add some flags at the end CFLAGS_APPEND = CFLAGS = $(MWCFLAGS) $(CFLAGS_APPEND) LDFLAGS = $(MWLDFLAGS) CODE=$(wildcard *.c) HDRS=$(wildcard *.h) all: build # Using -MMD -MF <filename> outputs make rules for the required .o into # <filename> with automatically generated dependencies on the .c file and the # local headers included by the .c file %.o: %.c $(CC) $(CFLAGS) $(CFLAGS_APPEND) -c -o $@ $< $(CC) $(CFLAGS) -MMD -MF .$(@:.o=.d) -c -o $@ $< -include $(CODE:.c=.d) # The generated rule for the requested .o file is then included, dependencies # are checked and the rule is executed without the -M* options. -include $(CODE:%.c=.%.d) $(JSOBJ): $(MAKE) -C $(SRCROOT)/mozjs libdir=/usr/lib Loading
src/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ install: all install -d $(DESTDIR)$(STATEDIR) clean: -rm -f *.o *.d nonce-def.h mw mwserv libmw.a -rm -f *.o *.d .*.d nonce-def.h mw mwserv libmw.a cleanall: clean $(MAKE) -C client clean Loading
src/client/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ install: mw install -D mw $(DESTDIR)$(bindir)/mw clean: -rm -f *.o *.d mw -rm -f *.o .*.d *.d mw ifndef TESTDIR test: Loading
src/server/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ mwserv: $(CODE:.c=.o) ../libmw.a $(JSOBJ) $(CC) $(LDFLAGS) $(LDLIBS) -o $@ $^ clean: -rm -f *.o *.d mwserv -rm -f *.o .*.d *.d mwserv install: mwserv install -D mwserv $(DESTDIR)$(HOMEPATH)/mwserv Loading
src/utils/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -22,4 +22,4 @@ sizes: sizes.o $(CC) $(LDFLAGS) $(LDLIBS) -o $@ $^ clean: rm -f *.o *.d listuser fixuser del_user sizes rm -f *.o .*.d *.d listuser fixuser del_user sizes