From 4dce5ac764ee8c3511e7c3ca46ae8f3eaf2eb3d3 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 12 Jul 2018 20:02:42 +0100 Subject: [PATCH] Add Linux GUI and GUI + GPIO makefiles. --- DStarRepeater/MakefileGUI | 17 +++++++++++++++++ Makefile | 4 ++-- Makefile.Pi | 2 +- MakefileGUI | 36 ++++++++++++++++++++++++++++++++++++ MakefileGUIPi | 36 ++++++++++++++++++++++++++++++++++++ 5 files changed, 92 insertions(+), 3 deletions(-) create mode 100644 DStarRepeater/MakefileGUI create mode 100644 MakefileGUI create mode 100644 MakefileGUIPi diff --git a/DStarRepeater/MakefileGUI b/DStarRepeater/MakefileGUI new file mode 100644 index 0000000..aba746c --- /dev/null +++ b/DStarRepeater/MakefileGUI @@ -0,0 +1,17 @@ +OBJECTS = DStarRepeaterApp.o DStarRepeaterFrame.o DStarRepeaterLogRedirect.o DStarRepeaterRXThread.o DStarRepeaterStatusData.o \ + DStarRepeaterThread.o DStarRepeaterTRXThread.o DStarRepeaterTXRXThread.o DStarRepeaterTXThread.o + +all: dstarrepeater + +dstarrepeater: $(OBJECTS) + $(CXX) $(OBJECTS) ../Common/Common.a ../GUICommon/GUICommon.a $(LDFLAGS) $(GUILIBS) -o dstarrepeater + +%.o: %.cpp + $(CXX) $(CFLAGS) -I../Common -I../GUICommon -c -o $@ $< + +install: + install -g bin -o root -m 0775 dstarrepeater $(BINDIR) + +clean: + $(RM) dstarrepeater *.o *.d *.bak *~ + diff --git a/Makefile b/Makefile index 98ba93b..40858b1 100644 --- a/Makefile +++ b/Makefile @@ -5,14 +5,14 @@ export BINDIR := "/usr/bin" export CXX := $(shell wx-config --cxx) export CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' -export GUILIBS := $(shell wx-config --libs adv,core,base) -lasound +export GUILIBS := $(shell wx-config --libs adv,core,base) -lasound -lusb-1.0 export LIBS := $(shell wx-config --libs base) -lasound -lusb-1.0 export LDFLAGS := all: DStarRepeater/dstarrepeaterd DStarRepeaterConfig/dstarrepeaterconfig DStarRepeater/dstarrepeaterd: Common/Common.a - make -C DStarRepeater dstarrepeaterd + make -C DStarRepeater DStarRepeaterConfig/dstarrepeaterconfig: GUICommon/GUICommon.a Common/Common.a make -C DStarRepeaterConfig diff --git a/Makefile.Pi b/Makefile.Pi index bf0a59d..9a8f23f 100644 --- a/Makefile.Pi +++ b/Makefile.Pi @@ -12,7 +12,7 @@ export LDFLAGS := all: DStarRepeater/dstarrepeaterd DStarRepeaterConfig/dstarrepeaterconfig DStarRepeater/dstarrepeaterd: Common/Common.a - make -C DStarRepeater dstarrepeaterd + make -C DStarRepeater DStarRepeaterConfig/dstarrepeaterconfig: GUICommon/GUICommon.a Common/Common.a make -C DStarRepeaterConfig diff --git a/MakefileGUI b/MakefileGUI new file mode 100644 index 0000000..95c6792 --- /dev/null +++ b/MakefileGUI @@ -0,0 +1,36 @@ +export DATADIR := "/usr/share/dstarrepeater" +export LOGDIR := "/var/log" +export CONFDIR := "/etc" +export BINDIR := "/usr/bin" + +export CXX := $(shell wx-config --cxx) +export CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' +export GUILIBS := $(shell wx-config --libs adv,core,base) -lasound -lusb-1.0 +export LIBS := $(shell wx-config --libs base) -lasound -lusb-1.0 +export LDFLAGS := + +all: DStarRepeater/dstarrepeater DStarRepeaterConfig/dstarrepeaterconfig + +DStarRepeater/dstarrepeater: GUICommon/GUICommon.a Common/Common.a + make -C DStarRepeater -f MakefileGUI + +DStarRepeaterConfig/dstarrepeaterconfig: GUICommon/GUICommon.a Common/Common.a + make -C DStarRepeaterConfig + +GUICommon/GUICommon.a: + make -C GUICommon + +Common/Common.a: + make -C Common + +install: all + make -C Data install + make -C DStarRepeater install + make -C DStarRepeaterConfig install + +clean: + make -C Common clean + make -C GUICommon clean + make -C DStarRepeater clean + make -C DStarRepeaterConfig clean + diff --git a/MakefileGUIPi b/MakefileGUIPi new file mode 100644 index 0000000..39ce5ff --- /dev/null +++ b/MakefileGUIPi @@ -0,0 +1,36 @@ +export DATADIR := "/usr/share/dstarrepeater" +export LOGDIR := "/var/log" +export CONFDIR := "/etc" +export BINDIR := "/usr/bin" + +export CXX := $(shell wx-config --cxx) +export CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' -DGPIO +export GUILIBS := $(shell wx-config --libs adv,core,base) -lasound -lwiringPi +export LIBS := $(shell wx-config --libs base) -lasound -lwiringPi +export LDFLAGS := + +all: DStarRepeater/dstarrepeater DStarRepeaterConfig/dstarrepeaterconfig + +DStarRepeater/dstarrepeater: GUICommon/GUICommon.a Common/Common.a + make -C DStarRepeater -f MakefileGUI + +DStarRepeaterConfig/dstarrepeaterconfig: GUICommon/GUICommon.a Common/Common.a + make -C DStarRepeaterConfig + +GUICommon/GUICommon.a: + make -C GUICommon + +Common/Common.a: + make -C Common + +install: all + make -C Data install + make -C DStarRepeater install + make -C DStarRepeaterConfig install + +clean: + make -C Common clean + make -C GUICommon clean + make -C DStarRepeater clean + make -C DStarRepeaterConfig clean +