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
This commit is contained in:
Geoffrey Merck F4FXL - KC3FRA 2018-11-11 17:13:17 +01:00
parent 86744087a4
commit e66484340b
18 changed files with 100 additions and 0 deletions

View file

@ -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 *~

View file

@ -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 *~

View file

@ -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)

View file

@ -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 *~

View file

@ -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 *~

View file

@ -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 *~

View file

@ -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 *~

View file

@ -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 *~

View file

@ -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 *~

View file

@ -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 *~

View file

@ -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 *~

View file

@ -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 *~

View file

@ -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 *~

View file

@ -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 *~

View file

@ -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 *~

View file

@ -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 *~

View file

@ -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 *~

View file

@ -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 *~