From 86744087a4c7094f4a19310fff246fcea442916d Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 11 Nov 2018 17:12:05 +0100 Subject: [PATCH 1/3] Force crawling of sub-makes for changed dependencies Inspired by https://stackoverflow.com/questions/31293557/how-to-tell-make-to-watch-dependencies-of-a-sub-make-target Also make install, clean and all PHONY targets --- Makefile | 31 +++++++++++++++++++------------ MakefileGUI | 31 +++++++++++++++++++------------ 2 files changed, 38 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 7ebc1e6..7db19e6 100644 --- a/Makefile +++ b/Makefile @@ -12,45 +12,47 @@ export GUILIBS := $(shell wx-config --libs adv,core,base) export LIBS := $(shell wx-config --libs base) export LDFLAGS := +.PHONY: all all: ircDDBGateway/ircddbgatewayd ircDDBGatewayConfig/ircddbgatewayconfig APRSTransmit/aprstransmitd RemoteControl/remotecontrold \ StarNetServer/starnetserverd TextTransmit/texttransmitd TimerControl/timercontrold TimeServer/timeserverd VoiceTransmit/voicetransmitd -ircDDBGateway/ircddbgatewayd: Common/Common.a ircDDB/IRCDDB.a +ircDDBGateway/ircddbgatewayd: Common/Common.a ircDDB/IRCDDB.a force $(MAKE) -C ircDDBGateway -ircDDBGatewayConfig/ircddbgatewayconfig: GUICommon/GUICommon.a Common/Common.a +ircDDBGatewayConfig/ircddbgatewayconfig: GUICommon/GUICommon.a Common/Common.a force $(MAKE) -C ircDDBGatewayConfig -APRSTransmit/aprstransmitd: Common/Common.a +APRSTransmit/aprstransmitd: Common/Common.a force $(MAKE) -C APRSTransmit -RemoteControl/remotecontrold: Common/Common.a +RemoteControl/remotecontrold: Common/Common.a force $(MAKE) -C RemoteControl -StarNetServer/starnetserverd: Common/Common.a ircDDB/IRCDDB.a +StarNetServer/starnetserverd: Common/Common.a ircDDB/IRCDDB.a force $(MAKE) -C StarNetServer -TextTransmit/texttransmitd: Common/Common.a +TextTransmit/texttransmitd: Common/Common.a force $(MAKE) -C TextTransmit -TimerControl/timercontrold: Common/Common.a GUICommon/GUICommon.a +TimerControl/timercontrold: Common/Common.a GUICommon/GUICommon.a force $(MAKE) -C TimerControl -TimeServer/timeserverd: Common/Common.a GUICommon/GUICommon.a +TimeServer/timeserverd: Common/Common.a GUICommon/GUICommon.a force $(MAKE) -C TimeServer -VoiceTransmit/voicetransmitd: Common/Common.a +VoiceTransmit/voicetransmitd: Common/Common.a force $(MAKE) -C VoiceTransmit -GUICommon/GUICommon.a: +GUICommon/GUICommon.a: force $(MAKE) -C GUICommon -Common/Common.a: +Common/Common.a: force $(MAKE) -C Common -ircDDB/IRCDDB.a: +ircDDB/IRCDDB.a: force $(MAKE) -C ircDDB +.PHONY: install install: all $(MAKE) -C Data install $(MAKE) -C APRSTransmit install @@ -63,6 +65,7 @@ install: all $(MAKE) -C VoiceTransmit install $(MAKE) -C ircDDBGatewayConfig install +.PHONY: clean clean: $(MAKE) -C Common clean $(MAKE) -C ircDDB clean @@ -77,3 +80,7 @@ clean: $(MAKE) -C VoiceTransmit clean $(MAKE) -C ircDDBGatewayConfig clean +.PHONY: force +force : + true + diff --git a/MakefileGUI b/MakefileGUI index af13d02..e3ee47d 100644 --- a/MakefileGUI +++ b/MakefileGUI @@ -12,45 +12,47 @@ export GUILIBS := $(shell wx-config --libs adv,core,base) export LIBS := $(shell wx-config --libs base) export LDFLAGS := +.PHONY: all all: ircDDBGateway/ircddbgateway ircDDBGatewayConfig/ircddbgatewayconfig APRSTransmit/aprstransmitd RemoteControl/remotecontrol \ StarNetServer/starnetserver TextTransmit/texttransmitd TimerControl/timercontrol TimeServer/timeserver VoiceTransmit/voicetransmitd -ircDDBGateway/ircddbgateway: GUICommon/GUICommon.a Common/Common.a ircDDB/IRCDDB.a +ircDDBGateway/ircddbgateway: GUICommon/GUICommon.a Common/Common.a ircDDB/IRCDDB.a force $(MAKE) -C ircDDBGateway -f MakefileGUI -ircDDBGatewayConfig/ircddbgatewayconfig: GUICommon/GUICommon.a Common/Common.a +ircDDBGatewayConfig/ircddbgatewayconfig: GUICommon/GUICommon.a Common/Common.a force $(MAKE) -C ircDDBGatewayConfig -APRSTransmit/aprstransmitd: Common/Common.a +APRSTransmit/aprstransmitd: Common/Common.a force $(MAKE) -C APRSTransmit -RemoteControl/remotecontrol: Common/Common.a +RemoteControl/remotecontrol: Common/Common.a force $(MAKE) -C RemoteControl -f MakefileGUI -StarNetServer/starnetserver: Common/Common.a ircDDB/IRCDDB.a +StarNetServer/starnetserver: Common/Common.a ircDDB/IRCDDB.a force $(MAKE) -C StarNetServer -f MakefileGUI -TextTransmit/texttransmitd: Common/Common.a +TextTransmit/texttransmitd: Common/Common.a force $(MAKE) -C TextTransmit -TimerControl/timercontrol: Common/Common.a GUICommon/GUICommon.a +TimerControl/timercontrol: Common/Common.a GUICommon/GUICommon.a force $(MAKE) -C TimerControl -f MakefileGUI -TimeServer/timeserver: Common/Common.a GUICommon/GUICommon.a +TimeServer/timeserver: Common/Common.a GUICommon/GUICommon.a force $(MAKE) -C TimeServer -f MakefileGUI -VoiceTransmit/voicetransmitd: Common/Common.a +VoiceTransmit/voicetransmitd: Common/Common.a force $(MAKE) -C VoiceTransmit -GUICommon/GUICommon.a: +GUICommon/GUICommon.a: force $(MAKE) -C GUICommon -Common/Common.a: +Common/Common.a: force $(MAKE) -C Common -ircDDB/IRCDDB.a: +ircDDB/IRCDDB.a: force $(MAKE) -C ircDDB +.PHONY: install install: all $(MAKE) -C Data install $(MAKE) -C APRSTransmit install @@ -63,6 +65,7 @@ install: all $(MAKE) -C VoiceTransmit install $(MAKE) -C ircDDBGatewayConfig install +.PHONY: clean clean: $(MAKE) -C Common clean $(MAKE) -C ircDDB clean @@ -76,3 +79,7 @@ clean: $(MAKE) -C TimeServer -f MakefileGUI clean $(MAKE) -C VoiceTransmit clean $(MAKE) -C ircDDBGatewayConfig clean + +.PHONY: force +force: + true; From e66484340b1c7e067e5ac7a8c17cbdf1772e42a2 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 11 Nov 2018 17:13:17 +0100 Subject: [PATCH 2/3] Add generation of dependency files Generate dependency files so that when changing one file only stuff dependant on that file gets rebuilt. Avoid cleaning the whole thing on every small change --- APRSTransmit/Makefile | 6 ++++++ Common/Makefile | 5 +++++ Data/Makefile | 1 + GUICommon/Makefile | 5 +++++ RemoteControl/Makefile | 6 ++++++ RemoteControl/MakefileGUI | 6 ++++++ StarNetServer/Makefile | 6 ++++++ StarNetServer/MakefileGUI | 6 ++++++ TextTransmit/Makefile | 6 ++++++ TimeServer/Makefile | 6 ++++++ TimeServer/MakefileGUI | 6 ++++++ TimerControl/Makefile | 6 ++++++ TimerControl/MakefileGUI | 6 ++++++ VoiceTransmit/Makefile | 6 ++++++ ircDDB/Makefile | 5 +++++ ircDDBGateway/Makefile | 6 ++++++ ircDDBGateway/MakefileGUI | 6 ++++++ ircDDBGatewayConfig/Makefile | 6 ++++++ 18 files changed, 100 insertions(+) diff --git a/APRSTransmit/Makefile b/APRSTransmit/Makefile index 8814c53..20e9521 100644 --- a/APRSTransmit/Makefile +++ b/APRSTransmit/Makefile @@ -1,16 +1,22 @@ OBJECTS = APRSParser.o APRSTransmitAppD.o APRSTransmit.o +.PHONY: all all: aprstransmitd aprstransmitd: $(OBJECTS) $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o aprstransmitd +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) -DwxUSE_GUI=0 $(CFLAGS) -I../Common -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) -I../Common $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 aprstransmitd $(BINDIR) +.PHONY: clean clean: $(RM) aprstransmitd *.o *.d *.bak *~ diff --git a/Common/Makefile b/Common/Makefile index 8643148..b818a62 100644 --- a/Common/Makefile +++ b/Common/Makefile @@ -9,14 +9,19 @@ OBJECTS = AMBEData.o AnnouncementUnit.o APRSCollector.o APRSWriter.o APRSWriterT TCPReaderWriterClient.o TCPReaderWriterServer.o TextCollector.o TextData.o Timer.o UDPReaderWriter.o UserCache.o Utils.o \ VersionUnit.o XLXHostsFileDownloader.o +.PHONY: all all: Common.a Common.a: $(OBJECTS) $(AR) rcs Common.a $(OBJECTS) +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) -DwxUSE_GUI=0 $(CFLAGS) -I../ircDDB -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) -I../ircDDB $< > $*.d +.PHONY: clean clean: $(RM) Common.a *.o *.d *.bak *~ diff --git a/Data/Makefile b/Data/Makefile index 4350c30..c115445 100644 --- a/Data/Makefile +++ b/Data/Makefile @@ -1,3 +1,4 @@ +.PHONY: install install: install -d -g bin -o root -m 0775 $(DATADIR) install -g bin -o root -m 0664 CCS_Hosts.txt $(DATADIR) diff --git a/GUICommon/Makefile b/GUICommon/Makefile index 4a837a3..9c4717c 100644 --- a/GUICommon/Makefile +++ b/GUICommon/Makefile @@ -1,14 +1,19 @@ OBJECTS = AddressTextCtrl.o CallsignTextCtrl.o DCSSet.o DescriptionTextCtrl.o DExtraSet.o DPlusSet.o DPRSSet.o PortTextCtrl.o RemoteSet.o \ RepeaterDataSet.o RepeaterInfoSet.o RestrictedTextCtrl.o StarNetSet.o XLXSet.o +.PHONY: all all: GUICommon.a GUICommon.a: $(OBJECTS) $(AR) rcs GUICommon.a $(OBJECTS) +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) $(CFLAGS) -I../Common -c -o $@ $< + $(CXX) -MM $(CFLAGS) -I../Common $< > $*.d +.PHONY: clean clean: $(RM) GUICommon.a *.o *.d *.bak *~ diff --git a/RemoteControl/Makefile b/RemoteControl/Makefile index 48a2a54..978286d 100644 --- a/RemoteControl/Makefile +++ b/RemoteControl/Makefile @@ -1,17 +1,23 @@ OBJECTS = RemoteControlAppD.o RemoteControlCallsignData.o RemoteControlConfig.o RemoteControlLinkData.o RemoteControlRemoteControlHandler.o \ RemoteControlRepeaterData.o RemoteControlStarNetGroup.o RemoteControlStarNetUser.o +.PHONY: all all: remotecontrold remotecontrold: $(OBJECTS) $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o remotecontrold +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) -DwxUSE_GUI=0 $(CFLAGS) -I../Common -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) -I../Common $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 remotecontrold $(BINDIR) +.PHONY: clean clean: $(RM) remotecontrold *.o *.d *.bak *~ diff --git a/RemoteControl/MakefileGUI b/RemoteControl/MakefileGUI index 316607f..566a990 100644 --- a/RemoteControl/MakefileGUI +++ b/RemoteControl/MakefileGUI @@ -2,17 +2,23 @@ OBJECTS = RemoteControlApp.o RemoteControlCallsignData.o RemoteControlConfig.o R RemoteControlPreferences.o RemoteControlRemoteControlHandler.o RemoteControlRemoteSet.o RemoteControlRepeaterData.o \ RemoteControlRepeaterPanel.o RemoteControlStarNetGroup.o RemoteControlStarNetPanel.o RemoteControlStarNetUser.o +.PHONY: all all: remotecontrol remotecontrol: $(OBJECTS) $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(LDFLAGS) $(GUILIBS) -o remotecontrol +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) $(CFLAGS) -I../Common -I../GUICommon -c -o $@ $< + $(CXX) -MM $(CFLAGS) -I../Common -I../GUICommon $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 remotecontrol $(BINDIR) +.PHONY: clean clean: $(RM) remotecontrol *.o *.d *.bak *~ diff --git a/StarNetServer/Makefile b/StarNetServer/Makefile index f49f112..cffdda5 100644 --- a/StarNetServer/Makefile +++ b/StarNetServer/Makefile @@ -1,16 +1,22 @@ OBJECTS = StarNetServerAppD.o StarNetServerConfig.o StarNetServerThread.o StarNetServerThreadHelper.o +.PHONY: all all: starnetserverd starnetserverd: $(OBJECTS) $(CXX) $(OBJECTS) ../Common/Common.a ../ircDDB/IRCDDB.a $(LDFLAGS) $(LIBS) -o starnetserverd +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) -DwxUSE_GUI=0 $(CFLAGS) -I../Common -I../ircDDB -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) -I../Common -I../ircDDB $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 starnetserverd $(BINDIR) +.PHONY: clean clean: $(RM) starnetserverd *.o *.d *.bak *~ diff --git a/StarNetServer/MakefileGUI b/StarNetServer/MakefileGUI index 9073dab..3f45261 100644 --- a/StarNetServer/MakefileGUI +++ b/StarNetServer/MakefileGUI @@ -2,17 +2,23 @@ OBJECTS = StarNetServerApp.o StarNetServerCallsignSet.o StarNetServerConfig.o St StarNetServerLogRedirect.o StarNetServerMiscellaneousSet.o StarNetServerPreferences.o StarNetServerThread.o \ StarNetServerThreadHelper.o +.PHONY: all all: starnetserver starnetserver: $(OBJECTS) $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a ../ircDDB/IRCDDB.a $(LDFLAGS) $(GUILIBS) -o starnetserver +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) $(CFLAGS) -I../Common -I../GUICommon -I../ircDDB -c -o $@ $< + $(CXX) -MM $(CFLAGS) -I../Common -I../GUICommon -I../ircDDB $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 starnetserver $(BINDIR) +.PHONY: clean clean: $(RM) starnetserver *.o *.d *.bak *~ diff --git a/TextTransmit/Makefile b/TextTransmit/Makefile index c4e70bc..14ddb89 100644 --- a/TextTransmit/Makefile +++ b/TextTransmit/Makefile @@ -1,16 +1,22 @@ OBJECTS = TextTransmit.o +.PHONY: all all: texttransmitd texttransmitd: $(OBJECTS) $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o texttransmitd +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) -DwxUSE_GUI=0 $(CFLAGS) -I../Common -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) -I../Common $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 texttransmitd $(BINDIR) +.PHONY: clean clean: $(RM) texttransmitd *.o *.d *.bak *~ diff --git a/TimeServer/Makefile b/TimeServer/Makefile index 69b2339..88119ee 100644 --- a/TimeServer/Makefile +++ b/TimeServer/Makefile @@ -1,16 +1,22 @@ OBJECTS = TimeServerD.o TimeServerConfig.o TimeServerThread.o TimeServerThreadHelper.o +.PHONY: all all: timeserverd timeserverd: $(OBJECTS) $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o timeserverd +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) -DwxUSE_GUI=0 $(CFLAGS) -I../Common -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) -I../Common $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 timeserverd $(BINDIR) +.PHONY: clean clean: $(RM) timeserverd *.o *.d *.bak *~ diff --git a/TimeServer/MakefileGUI b/TimeServer/MakefileGUI index 9ac2e11..3f902cf 100644 --- a/TimeServer/MakefileGUI +++ b/TimeServer/MakefileGUI @@ -1,17 +1,23 @@ OBJECTS = TimeServerApp.o TimeServerAnnouncementsSet.o TimeServerConfig.o TimeServerFrame.o TimeServerGatewaySet.o TimeServerLogRedirect.o \ TimeServerPreferences.o TimeServerThread.o TimeServerThreadHelper.o +.PHONY: all all: timeserver timeserver: $(OBJECTS) $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(LDFLAGS) $(GUILIBS) -o timeserver +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) $(CFLAGS) -I../Common -I../GUICommon -c -o $@ $< + $(CXX) -MM $(CFLAGS) -I../Common -I../GUICommon $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 timeserver $(BINDIR) +.PHONY: clean clean: $(RM) timeserver *.o *.d *.bak *~ diff --git a/TimerControl/Makefile b/TimerControl/Makefile index 53877ff..eebb6a6 100644 --- a/TimerControl/Makefile +++ b/TimerControl/Makefile @@ -1,17 +1,23 @@ OBJECTS = TimerControlAppD.o TimerControlConfig.o TimerControlItemFile.o TimerControlRemoteControlHandler.o TimerControlThread.o \ TimerControlThreadHelper.o +.PHONY: all all: timercontrold timercontrold: $(OBJECTS) $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o timercontrold +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) -DwxUSE_GUI=0 $(CFLAGS) -I../Common -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) -I../Common $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 timercontrold $(BINDIR) +.PHONY: clean clean: $(RM) timercontrold *.o *.d *.bak *~ diff --git a/TimerControl/MakefileGUI b/TimerControl/MakefileGUI index 0012a10..58646ea 100644 --- a/TimerControl/MakefileGUI +++ b/TimerControl/MakefileGUI @@ -2,17 +2,23 @@ OBJECTS = TimerControlApp.o TimerControlConfig.o TimerControlFrame.o TimerContro TimerControlRemoteControlHandler.o TimerControlRemoteSet.o TimerControlRepeaterPanel.o TimerControlThread.o \ TimerControlThreadHelper.o +.PHONY: all all: timercontrol timercontrol: $(OBJECTS) $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(LDFLAGS) $(GUILIBS) -o timercontrol +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) $(CFLAGS) -I../Common -I../GUICommon -c -o $@ $< + $(CXX) -MM $(CFLAGS) -I../Common -I../GUICommon $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 timercontrol $(BINDIR) +.PHONY: clean clean: $(RM) timercontrol *.o *.d *.bak *~ diff --git a/VoiceTransmit/Makefile b/VoiceTransmit/Makefile index 71cb8ef..ee651bf 100644 --- a/VoiceTransmit/Makefile +++ b/VoiceTransmit/Makefile @@ -1,16 +1,22 @@ OBJECTS = VoiceStore.o VoiceTransmit.o +.PHONY: all all: voicetransmitd voicetransmitd: $(OBJECTS) $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o voicetransmitd +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) -DwxUSE_GUI=0 $(CFLAGS) -I../Common -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) -I../Common $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 voicetransmitd $(BINDIR) +.PHONY: clean clean: $(RM) voicetransmitd *.o *.d *.bak *~ diff --git a/ircDDB/Makefile b/ircDDB/Makefile index b841a5e..5a6602c 100644 --- a/ircDDB/Makefile +++ b/ircDDB/Makefile @@ -1,14 +1,19 @@ OBJECTS = IRCClient.o IRCDDBApp.o IRCDDBClient.o IRCDDB.o IRCDDBMultiClient.o IRCMessage.o IRCMessageQueue.o IRCProtocol.o IRCReceiver.o \ IRCutils.o +.PHONY: all all: IRCDDB.a IRCDDB.a: $(OBJECTS) $(AR) rcs IRCDDB.a $(OBJECTS) +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) -DwxUSE_GUI=0 $(CFLAGS) -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) $< > $*.d +.PHONY: clean clean: $(RM) IRCDDB.a *.o *.d *.bak *~ diff --git a/ircDDBGateway/Makefile b/ircDDBGateway/Makefile index 3bf974e..9a43de0 100644 --- a/ircDDBGateway/Makefile +++ b/ircDDBGateway/Makefile @@ -1,16 +1,22 @@ OBJECTS = IRCDDBGatewayAppD.o IRCDDBGatewayStatusData.o IRCDDBGatewayThread.o IRCDDBGatewayThreadHelper.o +.PHONY: all all: ircddbgatewayd ircddbgatewayd: $(OBJECTS) $(CXX) $(OBJECTS) ../Common/Common.a ../ircDDB/IRCDDB.a $(LDFLAGS) $(LIBS) -o ircddbgatewayd +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) -DwxUSE_GUI=0 $(CFLAGS) -I../Common -I../ircDDB -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) -I../Common -I../ircDDB $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 ircddbgatewayd $(BINDIR) +.PHONY: clean clean: $(RM) ircddbgatewayd *.o *.d *.bak *~ diff --git a/ircDDBGateway/MakefileGUI b/ircDDBGateway/MakefileGUI index 8ebf8fa..e6c2a86 100644 --- a/ircDDBGateway/MakefileGUI +++ b/ircDDBGateway/MakefileGUI @@ -1,17 +1,23 @@ OBJECTS = IRCDDBGatewayApp.o IRCDDBGatewayFrame.o IRCDDBGatewayLogRedirect.o IRCDDBGatewayStatusData.o IRCDDBGatewayThread.o \ IRCDDBGatewayThreadHelper.o +.PHONY: all all: ircddbgateway ircddbgateway: $(OBJECTS) $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a ../ircDDB/IRCDDB.a $(LDFLAGS) $(GUILIBS) -o ircddbgateway +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) $(CFLAGS) -I../Common -I../GUICommon -I../ircDDB -c -o $@ $< + $(CXX) -MM $(CFLAGS) -I../Common -I../GUICommon -I../ircDDB $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 ircddbgateway $(BINDIR) +.PHONY: clean clean: $(RM) ircddbgateway *.o *.d *.bak *~ diff --git a/ircDDBGatewayConfig/Makefile b/ircDDBGatewayConfig/Makefile index bdc24ef..9099d00 100644 --- a/ircDDBGatewayConfig/Makefile +++ b/ircDDBGatewayConfig/Makefile @@ -1,17 +1,23 @@ OBJECTS = IRCDDBGatewayConfigApp.o IRCDDBGatewayConfigFrame.o IRCDDBGatewayConfigGatewaySet.o IRCDDBGatewayConfigIrcDDBSet.o \ IRCDDBGatewayConfigMiscellaneousSet.o +.PHONY: all all: ircddbgatewayconfig ircddbgatewayconfig: $(OBJECTS) $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(LDFLAGS) $(GUILIBS) -o ircddbgatewayconfig +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) $(CFLAGS) -I../Common -I../GUICommon -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) -I../Common -I../GUICommon $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 ircddbgatewayconfig $(BINDIR) +.PHONY: clean clean: $(RM) ircddbgatewayconfig *.o *.d *.bak *~ From dcb5b4b455dd2869358bb461aec51a40a867f219 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 11 Nov 2018 18:35:30 +0100 Subject: [PATCH 3/3] Add empty targets for dependencies in sub make file This forces make to check if dependency (eg ../Common/Common.a) is more recent than the target --- APRSTransmit/Makefile | 4 +++- Common/Makefile | 3 ++- GUICommon/Makefile | 3 ++- Makefile | 2 +- RemoteControl/Makefile | 3 ++- RemoteControl/MakefileGUI | 4 +++- StarNetServer/Makefile | 4 +++- StarNetServer/MakefileGUI | 4 +++- TextTransmit/Makefile | 3 ++- TimeServer/Makefile | 3 ++- TimeServer/MakefileGUI | 4 +++- TimerControl/Makefile | 4 +++- TimerControl/MakefileGUI | 4 +++- VoiceTransmit/Makefile | 3 ++- ircDDBGateway/Makefile | 5 ++++- ircDDBGateway/MakefileGUI | 5 ++++- ircDDBGatewayConfig/Makefile | 4 +++- 17 files changed, 45 insertions(+), 17 deletions(-) diff --git a/APRSTransmit/Makefile b/APRSTransmit/Makefile index 20e9521..17e82b4 100644 --- a/APRSTransmit/Makefile +++ b/APRSTransmit/Makefile @@ -3,7 +3,7 @@ OBJECTS = APRSParser.o APRSTransmitAppD.o APRSTransmit.o .PHONY: all all: aprstransmitd -aprstransmitd: $(OBJECTS) +aprstransmitd: $(OBJECTS) ../Common/Common.a $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o aprstransmitd -include $(OBJECTS:.o=.d) @@ -20,3 +20,5 @@ install: clean: $(RM) aprstransmitd *.o *.d *.bak *~ +../Common/Common.a: + diff --git a/Common/Makefile b/Common/Makefile index b818a62..0243a4b 100644 --- a/Common/Makefile +++ b/Common/Makefile @@ -12,7 +12,7 @@ OBJECTS = AMBEData.o AnnouncementUnit.o APRSCollector.o APRSWriter.o APRSWriterT .PHONY: all all: Common.a -Common.a: $(OBJECTS) +Common.a: $(OBJECTS) ../ircDDB/IRCDDB.a $(AR) rcs Common.a $(OBJECTS) -include $(OBJECTS:.o=.d) @@ -25,3 +25,4 @@ Common.a: $(OBJECTS) clean: $(RM) Common.a *.o *.d *.bak *~ +../ircDDB/IRCDDB.a: diff --git a/GUICommon/Makefile b/GUICommon/Makefile index 9c4717c..6412cb2 100644 --- a/GUICommon/Makefile +++ b/GUICommon/Makefile @@ -4,7 +4,7 @@ OBJECTS = AddressTextCtrl.o CallsignTextCtrl.o DCSSet.o DescriptionTextCtrl.o DE .PHONY: all all: GUICommon.a -GUICommon.a: $(OBJECTS) +GUICommon.a: $(OBJECTS) ../Common/Common.a $(AR) rcs GUICommon.a $(OBJECTS) -include $(OBJECTS:.o=.d) @@ -17,3 +17,4 @@ GUICommon.a: $(OBJECTS) clean: $(RM) GUICommon.a *.o *.d *.bak *~ +../Common/Common.a: diff --git a/Makefile b/Makefile index 7db19e6..1610fd0 100644 --- a/Makefile +++ b/Makefile @@ -82,5 +82,5 @@ clean: .PHONY: force force : - true + @true diff --git a/RemoteControl/Makefile b/RemoteControl/Makefile index 978286d..a4c399a 100644 --- a/RemoteControl/Makefile +++ b/RemoteControl/Makefile @@ -4,7 +4,7 @@ OBJECTS = RemoteControlAppD.o RemoteControlCallsignData.o RemoteControlConfig.o .PHONY: all all: remotecontrold -remotecontrold: $(OBJECTS) +remotecontrold: $(OBJECTS) ../Common/Common.a $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o remotecontrold -include $(OBJECTS:.o=.d) @@ -21,3 +21,4 @@ install: clean: $(RM) remotecontrold *.o *.d *.bak *~ +../Common/Common.a: diff --git a/RemoteControl/MakefileGUI b/RemoteControl/MakefileGUI index 566a990..ed75ed9 100644 --- a/RemoteControl/MakefileGUI +++ b/RemoteControl/MakefileGUI @@ -5,7 +5,7 @@ OBJECTS = RemoteControlApp.o RemoteControlCallsignData.o RemoteControlConfig.o R .PHONY: all all: remotecontrol -remotecontrol: $(OBJECTS) +remotecontrol: $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(LDFLAGS) $(GUILIBS) -o remotecontrol -include $(OBJECTS:.o=.d) @@ -22,3 +22,5 @@ install: clean: $(RM) remotecontrol *.o *.d *.bak *~ +../GUICommon/GUICommon.a: +../Common/Common.a: diff --git a/StarNetServer/Makefile b/StarNetServer/Makefile index cffdda5..a08a3b6 100644 --- a/StarNetServer/Makefile +++ b/StarNetServer/Makefile @@ -3,7 +3,7 @@ OBJECTS = StarNetServerAppD.o StarNetServerConfig.o StarNetServerThread.o StarNe .PHONY: all all: starnetserverd -starnetserverd: $(OBJECTS) +starnetserverd: $(OBJECTS) ../Common/Common.a ../ircDDB/IRCDDB.a $(CXX) $(OBJECTS) ../Common/Common.a ../ircDDB/IRCDDB.a $(LDFLAGS) $(LIBS) -o starnetserverd -include $(OBJECTS:.o=.d) @@ -20,3 +20,5 @@ install: clean: $(RM) starnetserverd *.o *.d *.bak *~ +../Common/Common.a: +../ircDDB/IRCDDB.a: diff --git a/StarNetServer/MakefileGUI b/StarNetServer/MakefileGUI index 3f45261..61fe271 100644 --- a/StarNetServer/MakefileGUI +++ b/StarNetServer/MakefileGUI @@ -5,7 +5,7 @@ OBJECTS = StarNetServerApp.o StarNetServerCallsignSet.o StarNetServerConfig.o St .PHONY: all all: starnetserver -starnetserver: $(OBJECTS) +starnetserver: $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a ../ircDDB/IRCDDB.a $(LDFLAGS) $(GUILIBS) -o starnetserver -include $(OBJECTS:.o=.d) @@ -22,3 +22,5 @@ install: clean: $(RM) starnetserver *.o *.d *.bak *~ +../GUICommon/GUICommon.a: +../Common/Common.a: diff --git a/TextTransmit/Makefile b/TextTransmit/Makefile index 14ddb89..a059e2e 100644 --- a/TextTransmit/Makefile +++ b/TextTransmit/Makefile @@ -3,7 +3,7 @@ OBJECTS = TextTransmit.o .PHONY: all all: texttransmitd -texttransmitd: $(OBJECTS) +texttransmitd: $(OBJECTS) ../Common/Common.a $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o texttransmitd -include $(OBJECTS:.o=.d) @@ -20,3 +20,4 @@ install: clean: $(RM) texttransmitd *.o *.d *.bak *~ +../Common/Common.a: diff --git a/TimeServer/Makefile b/TimeServer/Makefile index 88119ee..eca5c6a 100644 --- a/TimeServer/Makefile +++ b/TimeServer/Makefile @@ -3,7 +3,7 @@ OBJECTS = TimeServerD.o TimeServerConfig.o TimeServerThread.o TimeServerThreadHe .PHONY: all all: timeserverd -timeserverd: $(OBJECTS) +timeserverd: $(OBJECTS) ../Common/Common.a $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o timeserverd -include $(OBJECTS:.o=.d) @@ -20,3 +20,4 @@ install: clean: $(RM) timeserverd *.o *.d *.bak *~ +../Common/Common.a: diff --git a/TimeServer/MakefileGUI b/TimeServer/MakefileGUI index 3f902cf..9982b46 100644 --- a/TimeServer/MakefileGUI +++ b/TimeServer/MakefileGUI @@ -4,7 +4,7 @@ OBJECTS = TimeServerApp.o TimeServerAnnouncementsSet.o TimeServerConfig.o TimeSe .PHONY: all all: timeserver -timeserver: $(OBJECTS) +timeserver: $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(LDFLAGS) $(GUILIBS) -o timeserver -include $(OBJECTS:.o=.d) @@ -21,3 +21,5 @@ install: clean: $(RM) timeserver *.o *.d *.bak *~ +../GUICommon/GUICommon.a: +../Common/Common.a: diff --git a/TimerControl/Makefile b/TimerControl/Makefile index eebb6a6..823e32c 100644 --- a/TimerControl/Makefile +++ b/TimerControl/Makefile @@ -4,7 +4,7 @@ OBJECTS = TimerControlAppD.o TimerControlConfig.o TimerControlItemFile.o TimerCo .PHONY: all all: timercontrold -timercontrold: $(OBJECTS) +timercontrold: $(OBJECTS) ../Common/Common.a $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o timercontrold -include $(OBJECTS:.o=.d) @@ -21,3 +21,5 @@ install: clean: $(RM) timercontrold *.o *.d *.bak *~ +../Common/Common.a: + diff --git a/TimerControl/MakefileGUI b/TimerControl/MakefileGUI index 58646ea..fdcccc0 100644 --- a/TimerControl/MakefileGUI +++ b/TimerControl/MakefileGUI @@ -5,7 +5,7 @@ OBJECTS = TimerControlApp.o TimerControlConfig.o TimerControlFrame.o TimerContro .PHONY: all all: timercontrol -timercontrol: $(OBJECTS) +timercontrol: $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(LDFLAGS) $(GUILIBS) -o timercontrol -include $(OBJECTS:.o=.d) @@ -22,3 +22,5 @@ install: clean: $(RM) timercontrol *.o *.d *.bak *~ +../GUICommon/GUICommon.a: +../Common/Common.a: diff --git a/VoiceTransmit/Makefile b/VoiceTransmit/Makefile index ee651bf..a81f4be 100644 --- a/VoiceTransmit/Makefile +++ b/VoiceTransmit/Makefile @@ -3,7 +3,7 @@ OBJECTS = VoiceStore.o VoiceTransmit.o .PHONY: all all: voicetransmitd -voicetransmitd: $(OBJECTS) +voicetransmitd: $(OBJECTS) ../Common/Common.a $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o voicetransmitd -include $(OBJECTS:.o=.d) @@ -20,3 +20,4 @@ install: clean: $(RM) voicetransmitd *.o *.d *.bak *~ +../Common/Common.a: diff --git a/ircDDBGateway/Makefile b/ircDDBGateway/Makefile index 9a43de0..f36c9a3 100644 --- a/ircDDBGateway/Makefile +++ b/ircDDBGateway/Makefile @@ -3,7 +3,7 @@ OBJECTS = IRCDDBGatewayAppD.o IRCDDBGatewayStatusData.o IRCDDBGatewayThread.o IR .PHONY: all all: ircddbgatewayd -ircddbgatewayd: $(OBJECTS) +ircddbgatewayd: $(OBJECTS) ../ircDDB/IRCDDB.a ../Common/Common.a $(CXX) $(OBJECTS) ../Common/Common.a ../ircDDB/IRCDDB.a $(LDFLAGS) $(LIBS) -o ircddbgatewayd -include $(OBJECTS:.o=.d) @@ -20,3 +20,6 @@ install: clean: $(RM) ircddbgatewayd *.o *.d *.bak *~ +../Common/Common.a: +../ircDDB/IRCDDB.a: + diff --git a/ircDDBGateway/MakefileGUI b/ircDDBGateway/MakefileGUI index e6c2a86..fa27871 100644 --- a/ircDDBGateway/MakefileGUI +++ b/ircDDBGateway/MakefileGUI @@ -4,7 +4,7 @@ OBJECTS = IRCDDBGatewayApp.o IRCDDBGatewayFrame.o IRCDDBGatewayLogRedirect.o IRC .PHONY: all all: ircddbgateway -ircddbgateway: $(OBJECTS) +ircddbgateway: $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a ../ircDDB/IRCDDB.a $(LDFLAGS) $(GUILIBS) -o ircddbgateway -include $(OBJECTS:.o=.d) @@ -21,3 +21,6 @@ install: clean: $(RM) ircddbgateway *.o *.d *.bak *~ +../GUICommon/GUICommon.a: +../Common/Common.a:s + diff --git a/ircDDBGatewayConfig/Makefile b/ircDDBGatewayConfig/Makefile index 9099d00..7aff717 100644 --- a/ircDDBGatewayConfig/Makefile +++ b/ircDDBGatewayConfig/Makefile @@ -4,7 +4,7 @@ OBJECTS = IRCDDBGatewayConfigApp.o IRCDDBGatewayConfigFrame.o IRCDDBGatewayConfi .PHONY: all all: ircddbgatewayconfig -ircddbgatewayconfig: $(OBJECTS) +ircddbgatewayconfig: $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(LDFLAGS) $(GUILIBS) -o ircddbgatewayconfig -include $(OBJECTS:.o=.d) @@ -21,3 +21,5 @@ install: clean: $(RM) ircddbgatewayconfig *.o *.d *.bak *~ +../Common/Common.a: +../GUICommon/GUICommon.a: