Files
bacnet_stack/apps/writebdt/Makefile
T
Steve Karg 295f127c2b Feature/makefile add apps library (#218)
* add BACnet stack library at apps/lib

* convert apps to use apps/lib for smaller binary

* fix -DBACDL_ALL=1 build

* fix piface build

* datalink MAX_MPDU and MAX_HEADER cleanup

* add bip6 to git workflow

* fix system library dependency of BACnet library

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-01-29 15:55:40 -06:00

41 lines
902 B
Makefile

#Makefile to build BACnet Application using GCC compiler
# Executable file name
TARGET = bacwbdt
# BACnet objects that are used with this app
BACNET_OBJECT_DIR = $(BACNET_SRC_DIR)/bacnet/basic/object
SRC = main.c \
$(BACNET_OBJECT_DIR)/client/device-client.c \
$(BACNET_OBJECT_DIR)/netport.c
# TARGET_EXT is defined in apps/Makefile as .exe or nothing
TARGET_BIN = ${TARGET}$(TARGET_EXT)
OBJS += ${SRC:.c=.o}
all: ${BACNET_LIB_TARGET} Makefile ${TARGET_BIN}
${TARGET_BIN}: ${OBJS} Makefile ${BACNET_LIB_TARGET}
${CC} ${PFLAGS} ${OBJS} ${LFLAGS} -o $@
size $@
cp $@ ../../bin
${BACNET_LIB_TARGET}:
( cd ${BACNET_LIB_DIR} ; $(MAKE) clean ; $(MAKE) -s )
.c.o:
${CC} -c ${CFLAGS} $*.c -o $@
.PHONY: depend
depend:
rm -f .depend
${CC} -MM ${CFLAGS} *.c >> .depend
.PHONY: clean
clean:
rm -f core ${TARGET_BIN} ${OBJS} $(TARGET).map ${BACNET_LIB_TARGET}
.PHONY: include
include: .depend