diff --git a/APRSFormater.cpp b/APRS/APRSFormater.cpp similarity index 100% rename from APRSFormater.cpp rename to APRS/APRSFormater.cpp diff --git a/APRSFormater.h b/APRS/APRSFormater.h similarity index 100% rename from APRSFormater.h rename to APRS/APRSFormater.h diff --git a/APRSFrame.cpp b/APRS/APRSFrame.cpp similarity index 100% rename from APRSFrame.cpp rename to APRS/APRSFrame.cpp diff --git a/APRSFrame.h b/APRS/APRSFrame.h similarity index 100% rename from APRSFrame.h rename to APRS/APRSFrame.h diff --git a/APRSParser.cpp b/APRS/APRSParser.cpp similarity index 100% rename from APRSParser.cpp rename to APRS/APRSParser.cpp diff --git a/APRSParser.h b/APRS/APRSParser.h similarity index 100% rename from APRSParser.h rename to APRS/APRSParser.h diff --git a/APRSUtils.cpp b/APRS/APRSUtils.cpp similarity index 100% rename from APRSUtils.cpp rename to APRS/APRSUtils.cpp diff --git a/APRSUtils.h b/APRS/APRSUtils.h similarity index 100% rename from APRSUtils.h rename to APRS/APRSUtils.h diff --git a/APRS/Makefile b/APRS/Makefile new file mode 100644 index 0000000..d72b824 --- /dev/null +++ b/APRS/Makefile @@ -0,0 +1,12 @@ +SRCS = $(wildcard *.cpp) +OBJS = $(SRCS:.cpp=.o) +DEPS = $(SRCS:.cpp=.d) + +APRS.a: $(OBJS) + $(AR) rcs APRS.a $(OBJS) + +%.o : %.cpp + $(CC) -I../BaseCommon $(CPPFLAGS) -MMD -MD -c $< -o $@ + +clean: + $(RM) *.o *.d APRS.a \ No newline at end of file diff --git a/TCPReaderWriterClient.cpp b/BaseCommon/TCPReaderWriterClient.cpp similarity index 100% rename from TCPReaderWriterClient.cpp rename to BaseCommon/TCPReaderWriterClient.cpp diff --git a/TCPReaderWriterClient.h b/BaseCommon/TCPReaderWriterClient.h similarity index 100% rename from TCPReaderWriterClient.h rename to BaseCommon/TCPReaderWriterClient.h diff --git a/UDPReaderWriter.cpp b/BaseCommon/UDPReaderWriter.cpp similarity index 100% rename from UDPReaderWriter.cpp rename to BaseCommon/UDPReaderWriter.cpp diff --git a/UDPReaderWriter.h b/BaseCommon/UDPReaderWriter.h similarity index 100% rename from UDPReaderWriter.h rename to BaseCommon/UDPReaderWriter.h diff --git a/Makefile b/Makefile index 97b259f..45eb55d 100644 --- a/Makefile +++ b/Makefile @@ -45,15 +45,18 @@ DEPS = $(SRCS:.cpp=.d) .PHONY: all all: dstargateway -dstargateway : GitVersion.h $(OBJS) BaseCommon/BaseCommon.a - $(CC) $(CPPFLAGS) -o dstargateway $(OBJS) BaseCommon/BaseCommon.a $(LDFLAGS) +dstargateway : GitVersion.h $(OBJS) APRS/APRS.a BaseCommon/BaseCommon.a + $(CC) $(CPPFLAGS) -o dstargateway $(OBJS) APRS/APRS.a BaseCommon/BaseCommon.a $(LDFLAGS) %.o : %.cpp - $(CC) -IBaseCommon/ $(CPPFLAGS) -MMD -MD -c $< -o $@ + $(CC) -IAPRS/ -IBaseCommon/ $(CPPFLAGS) -MMD -MD -c $< -o $@ BaseCommon/BaseCommon.a: FORCE $(MAKE) -C BaseCommon +APRS/APRS.a: BaseCommon/BaseCommon.a FORCE + $(MAKE) -C APRS + GitVersion.h : FORCE ifneq ("$(wildcard .git/index)","") @echo "#pragma once" > /tmp/$@ @@ -76,6 +79,7 @@ endif clean: $(RM) GitVersion.h *.o *.d dstargateway $(MAKE) -C Tests clean + $(MAKE) -C APRS clean $(MAKE) -C BaseCommon clean -include $(DEPS)