diff --git a/bacnet-stack/abort.mak b/bacnet-stack/abort.mak index 0665ffd4..e4ba8225 100644 --- a/bacnet-stack/abort.mak +++ b/bacnet-stack/abort.mak @@ -4,19 +4,20 @@ BASEDIR = . #CFLAGS = -Wall -I. # -g for debugging with gdb #CFLAGS = -Wall -I. -g -CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_ABORT -g +CFLAGS = -Wall -Iinclude -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_ABORT -g -SRCS = bacdcode.c \ - bacint.c \ - bacstr.c \ - bigend.c \ - abort.c \ +SRC_DIR = src + +SRCS = $(SRC_DIR)/bacdcode.c \ + $(SRC_DIR)/bacint.c \ + $(SRC_DIR)/bacstr.c \ + $(SRC_DIR)/abort.c \ test/ctest.c -OBJS = ${SRCS:.c=.o} - TARGET = abort +OBJS = ${SRCS:.c=.o} + all: ${TARGET} ${TARGET}: ${OBJS} @@ -30,6 +31,6 @@ depend: ${CC} -MM ${CFLAGS} *.c >> .depend clean: - rm -rf core ${TARGET} $(OBJS) *.bak *.1 *.ini + rm -rf ${TARGET} $(OBJS) include: .depend diff --git a/bacnet-stack/address.mak b/bacnet-stack/address.mak index 2b915b0e..3199b2d2 100644 --- a/bacnet-stack/address.mak +++ b/bacnet-stack/address.mak @@ -4,10 +4,10 @@ BASEDIR = . #CFLAGS = -Wall -I. # -g for debugging with gdb #CFLAGS = -Wall -I. -g -CFLAGS = -Wall -I. -Itest -DTEST -DTEST_ADDRESS -g +CFLAGS = -Wall -Iinclude -Itest -DTEST -DTEST_ADDRESS -g -SRCS = address.c \ - bacaddr.c \ +SRCS = src/address.c \ + src/bacaddr.c \ test/ctest.c OBJS = ${SRCS:.c=.o} @@ -27,6 +27,6 @@ depend: ${CC} -MM ${CFLAGS} *.c >> .depend clean: - rm -rf core ${TARGET} $(OBJS) *.bak *.1 *.ini + rm -rf ${TARGET} $(OBJS) include: .depend diff --git a/bacnet-stack/arf.mak b/bacnet-stack/arf.mak index 7e2978e5..dc565f10 100644 --- a/bacnet-stack/arf.mak +++ b/bacnet-stack/arf.mak @@ -3,14 +3,13 @@ CC = gcc BASEDIR = . # -g for debugging with gdb DEFINES = -DBACFILE=1 -DBACDL_BIP=1 -DBIG_ENDIAN=0 -DTEST -DTEST_ATOMIC_READ_FILE -INCLUDES = -I. -Idemo/object -Itest +INCLUDES = -Iinclude -Idemo/object -Itest CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g -SRCS = bacdcode.c \ - bacint.c \ - bacstr.c \ - bigend.c \ - arf.c \ +SRCS = src/bacdcode.c \ + src/bacint.c \ + src/bacstr.c \ + src/arf.c \ test/ctest.c OBJS = ${SRCS:.c=.o} @@ -30,6 +29,6 @@ depend: ${CC} -MM ${CFLAGS} *.c >> .depend clean: - rm -rf core ${TARGET} $(OBJS) *.bak *.1 *.ini + rm -rf ${TARGET} $(OBJS) include: .depend diff --git a/bacnet-stack/awf.mak b/bacnet-stack/awf.mak index 556a21df..c54fc7ef 100644 --- a/bacnet-stack/awf.mak +++ b/bacnet-stack/awf.mak @@ -3,14 +3,13 @@ CC = gcc BASEDIR = . DEFINES = -DBACFILE=1 -DBACDL_BIP=1 -DBIG_ENDIAN=0 -DTEST -DTEST_ATOMIC_WRITE_FILE -INCLUDES = -I. -Idemo/object -Itest +INCLUDES = -Iinclude -Idemo/object -Itest CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g -SRCS = bacdcode.c \ - bacint.c \ - bacstr.c \ - bigend.c \ - awf.c \ +SRCS = src/bacdcode.c \ + src/bacint.c \ + src/bacstr.c \ + src/awf.c \ test/ctest.c OBJS = ${SRCS:.c=.o} @@ -30,6 +29,6 @@ depend: ${CC} -MM ${CFLAGS} *.c >> .depend clean: - rm -rf core ${TARGET} $(OBJS) *.bak *.1 *.ini + rm -rf ${TARGET} $(OBJS) include: .depend diff --git a/bacnet-stack/bacapp.mak b/bacnet-stack/bacapp.mak index f03ceafb..d80a8df9 100644 --- a/bacnet-stack/bacapp.mak +++ b/bacnet-stack/bacapp.mak @@ -3,16 +3,16 @@ CC = gcc BASEDIR = . #CFLAGS = -Wall -I. # -g for debugging with gdb -#CFLAGS = -Wall -I. -g -CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_BACNET_APPLICATION_DATA -g +DEFINES = -DBIG_ENDIAN=0 -DTEST -DTEST_BACNET_APPLICATION_DATA +CFLAGS = -Wall -Iinclude -Itest -g $(DEFINES) -SRCS = bacdcode.c \ - bacint.c \ - bacstr.c \ - bacapp.c \ - datetime.c \ - bactext.c \ - indtext.c \ +SRCS = src/bacdcode.c \ + src/bacint.c \ + src/bacstr.c \ + src/bacapp.c \ + src/datetime.c \ + src/bactext.c \ + src/indtext.c \ test/ctest.c OBJS = ${SRCS:.c=.o} @@ -32,6 +32,6 @@ depend: ${CC} -MM ${CFLAGS} *.c >> .depend clean: - rm -rf core ${TARGET} $(OBJS) *.bak *.1 *.ini + rm -rf ${TARGET} $(OBJS) include: .depend diff --git a/bacnet-stack/bacdcode.mak b/bacnet-stack/bacdcode.mak index 5ce1b7c9..179853bb 100644 --- a/bacnet-stack/bacdcode.mak +++ b/bacnet-stack/bacdcode.mak @@ -1,13 +1,14 @@ #Makefile to build unit tests CC = gcc BASEDIR = . -CFLAGS = -Wall -I. -Itest -g -DBIG_ENDIAN=0 -DTEST -DTEST_DECODE +DEFINES = -DBIG_ENDIAN=0 -DTEST -DTEST_DECODE +CFLAGS = -Wall -Iinclude -Itest -g $(DEFINES) TARGET = bacdcode -SRCS = bacdcode.c \ - bacint.c \ - bacstr.c \ +SRCS = src/bacdcode.c \ + src/bacint.c \ + src/bacstr.c \ test/ctest.c OBJS = ${SRCS:.c=.o} @@ -25,6 +26,6 @@ depend: ${CC} -MM ${CFLAGS} *.c >> .depend clean: - rm -rf core ${OBJS} ${TARGET} *.bak + rm -rf ${OBJS} ${TARGET} include: .depend diff --git a/bacnet-stack/bacerror.mak b/bacnet-stack/bacerror.mak index 8189399b..fa96378c 100644 --- a/bacnet-stack/bacerror.mak +++ b/bacnet-stack/bacerror.mak @@ -4,13 +4,13 @@ BASEDIR = . #CFLAGS = -Wall -I. # -g for debugging with gdb #CFLAGS = -Wall -I. -g -CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_BACERROR -g +DEFINES = -DBIG_ENDIAN=0 -DTEST -DTEST_BACERROR +CFLAGS = -Wall -Iinclude -Itest -g $(DEFINES) -SRCS = bacdcode.c \ - bacint.c \ - bacstr.c \ - bigend.c \ - bacerror.c \ +SRCS = src/bacdcode.c \ + src/bacint.c \ + src/bacstr.c \ + src/bacerror.c \ test/ctest.c OBJS = ${SRCS:.c=.o} @@ -30,6 +30,6 @@ depend: ${CC} -MM ${CFLAGS} *.c >> .depend clean: - rm -rf core ${TARGET} $(OBJS) *.bak *.1 *.ini + rm -rf ${TARGET} $(OBJS) include: .depend diff --git a/bacnet-stack/bacint.mak b/bacnet-stack/bacint.mak index 5cd4718f..b9247fa4 100644 --- a/bacnet-stack/bacint.mak +++ b/bacnet-stack/bacint.mak @@ -1,12 +1,13 @@ #Makefile to build unit tests CC = gcc BASEDIR = . -CFLAGS = -Wall -I. -Itest -g -DBIG_ENDIAN=0 -DTEST -DTEST_BACINT +DEFINES = -DBIG_ENDIAN=0 -DTEST -DTEST_BACINT +CFLAGS = -Wall -Iinclude -Itest -g $(DEFINES) TARGET = bacint -SRCS = bacint.c \ - bacstr.c \ +SRCS = src/bacint.c \ + src/bacstr.c \ test/ctest.c OBJS = ${SRCS:.c=.o} @@ -24,6 +25,6 @@ depend: ${CC} -MM ${CFLAGS} *.c >> .depend clean: - rm -rf core ${OBJS} ${TARGET} *.bak + rm -rf ${OBJS} ${TARGET} include: .depend