summaryrefslogtreecommitdiff
blob: 4c0c83709dd01fc5097a8883328de410464a76c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- wvdial-1.61/wvrules-posix.mk
+++ wvdial-1.61/wvrules-posix.mk
@@ -85,12 +85,15 @@
 	$(AR) s $1
 endef
 
-CC: FORCE
+CC:
 	@CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
 	  $(WVSTREAMS_SRC)/gen-cc CC c
 
-CXX: FORCE
+CXX:
 	@CC="$(CXX)" CFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
 	  $(WVSTREAMS_SRC)/gen-cc CXX cc
 
+#All files must depend on the above two rules. This is a godawful hack.
+$(shell find -type f '(' -name '*.c' -o -name '*.cc' ')' ): CC CXX
+
 wvlink=$(LINK_MSG)$(WVLINK_CC) $(LDFLAGS) $($1-LDFLAGS) -o $1 $(filter %.o %.a %.so, $2) $($1-LIBS) $(XX_LIBS) $(LDLIBS) $(PRELIBS) $(LIBS)