You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.5 KiB
53 lines
1.5 KiB
export BUILD ?= debug
|
|
export DATADIR ?= /usr/share/dstarrepeater
|
|
export LOGDIR ?= /var/log
|
|
export CONFDIR ?= /etc
|
|
export BINDIR ?= /usr/bin
|
|
|
|
DEBUGFLAGS := -g -D_DEBUG
|
|
RELEASEFLAGS := -DNDEBUG -DwxDEBUG_LEVEL=0
|
|
|
|
export CXX := $(shell wx-config --cxx)
|
|
export CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='"$(LOGDIR)"' -DCONF_DIR='"$(CONFDIR)"' -DDATA_DIR='"$(DATADIR)"'
|
|
ifeq ($(BUILD), debug)
|
|
export CFLAGS := $(CFLAGS) $(DEBUGFLAGS)
|
|
else ifeq ($(BUILD), release)
|
|
export CFLAGS := $(CFLAGS) $(RELEASEFLAGS)
|
|
endif
|
|
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 :=
|
|
|
|
.PHONY: install installdirs clean force
|
|
|
|
all: DStarRepeater/dstarrepeater DStarRepeaterConfig/dstarrepeaterconfig
|
|
|
|
DStarRepeater/dstarrepeater: GUICommon/GUICommon.a Common/Common.a force
|
|
$(MAKE) -C DStarRepeater -f MakefileGUI
|
|
|
|
DStarRepeaterConfig/dstarrepeaterconfig: GUICommon/GUICommon.a Common/Common.a force
|
|
$(MAKE) -C DStarRepeaterConfig
|
|
|
|
GUICommon/GUICommon.a: force
|
|
$(MAKE) -C GUICommon
|
|
|
|
Common/Common.a: force
|
|
$(MAKE) -C Common
|
|
|
|
installdirs:
|
|
/bin/mkdir -p $(DESTDIR)$(DATADIR) $(DESTDIR)$(LOGDIR) $(DESTDIR)$(CONFDIR) $(DESTDIR)$(BINDIR)
|
|
|
|
install: all installdirs
|
|
$(MAKE) -C Data install
|
|
$(MAKE) -C DStarRepeater -f MakefileGUI install
|
|
$(MAKE) -C DStarRepeaterConfig install
|
|
|
|
clean:
|
|
$(MAKE) -C Common clean
|
|
$(MAKE) -C GUICommon clean
|
|
$(MAKE) -C DStarRepeater -f MakefileGUI clean
|
|
$(MAKE) -C DStarRepeaterConfig clean
|
|
|
|
force:
|
|
@true
|