Added OS detection into tests to add EXE extension to test executables for cleanup. (#46)

This commit is contained in:
Steve Karg
2020-02-18 08:22:16 -06:00
committed by GitHub
parent 9c41180145
commit 677f528aa4
47 changed files with 426 additions and 148 deletions
+15 -6
View File
@@ -6,29 +6,38 @@ DEFINES = -DBIG_ENDIAN=0 -DTEST -DTEST_OBJECT_LIST
CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g
SRCS = $(SRC_DIR)/bacnet/objects.c \
SRCS = $(SRC_DIR)/bacnet/basic/object/objects.c \
$(SRC_DIR)/bacnet/basic/sys/keylist.c \
$(SRC_DIR)/bacnet/basic/sys/key.c \
ctest.c
TARGET = rp
TARGET_NAME = objects
ifeq ($(OS),Windows_NT)
TARGET_EXT = .exe
else
TARGET_EXT =
endif
TARGET = $(TARGET_NAME)$(TARGET_EXT)
all: ${TARGET}
OBJS = ${SRCS:.c=.o}
${TARGET}: ${OBJS}
${CC} -o $@ ${OBJS}
${CC} -o $@ ${OBJS}
.c.o:
${CC} -c ${CFLAGS} $*.c -o $@
depend:
rm -f .depend
${CC} -MM ${CFLAGS} *.c >> .depend
clean:
rm -rf core ${TARGET} $(OBJS) *.bak *.1 *.ini
test:
./${TARGET}
include: .depend