Updated ports client/server demo to use BACnet library.

This commit is contained in:
skarg
2007-08-24 00:41:08 +00:00
parent 686030e197
commit 23fbc1eee7
+48 -68
View File
@@ -14,111 +14,91 @@ BORLAND_DIR_Not_Defined:
PRODUCT = bacnet PRODUCT = bacnet
PRODUCT_EXE = $(PRODUCT).exe PRODUCT_EXE = $(PRODUCT).exe
# Choose the Data Link Layer to Enable # tools
DEFINES = -DBACDL_BIP=1;TSM_ENABLED=1;BIG_ENDIAN=0 CC = $(BORLAND_DIR)\bin\bcc32
MAKE=$(BORLAND_DIR)\bin\make.exe
#LINK = $(BORLAND_DIR)\bin\tlink32
LINK = $(BORLAND_DIR)\bin\ilink32
SRCS = main.c bip-init.c \ BACNET_LIB_DIR = ..\..\lib
..\..\bip.c \ BACNET_LIB = $(BACNET_LIB_DIR)\bacnet.lib
..\..\demo\handler\h_iam.c \
..\..\demo\handler\h_whois.c \ # directories
..\..\demo\handler\h_wp.c \ BACNET_PORT = .
..\..\demo\handler\h_rp.c \ BACNET_OBJECT = ..\..\demo\object
..\..\demo\handler\h_rp_a.c \ BACNET_HANDLER = ..\..\demo\handler
..\..\demo\handler\noserv.c \ BACNET_ROOT = ..\..
..\..\demo\handler\txbuf.c \ INCLUDES = \
..\..\demo\handler\s_rp.c \ -I$(BACNET_ROOT) \
..\..\demo\handler\s_whois.c \ -I$(BACNET_PORT) \
..\..\bacdcode.c \ -I$(BACNET_OBJECT) \
..\..\bacint.c \ -I$(BACNET_HANDLER) \
..\..\bacapp.c \ -I$(BORLAND_DIR)\include
..\..\bacstr.c \
..\..\bactext.c \ #
..\..\indtext.c \ BACNET_DEFINES = -DPRINT_ENABLED=1
..\..\bigend.c \ #BACDL_DEFINE=-DBACDL_MSTP=1
..\..\whois.c \ BACDL_DEFINE=-DBACDL_BIP=1
..\..\iam.c \ DEFINES = $(BACNET_DEFINES) $(BACDL_DEFINE)
..\..\dcc.c \
..\..\rp.c \ SRCS = main.c
..\..\wp.c \
..\..\arf.c \
..\..\awf.c \
..\..\demo\object\bacfile.c \
..\..\demo\object\device.c \
..\..\demo\object\ai.c \
..\..\demo\object\ao.c \
..\..\demo\object\av.c \
..\..\demo\object\bi.c \
..\..\demo\object\bo.c \
..\..\demo\object\bv.c \
..\..\demo\object\lsp.c \
..\..\demo\object\mso.c \
..\..\datalink.c \
..\..\tsm.c \
..\..\address.c \
..\..\abort.c \
..\..\reject.c \
..\..\bacerror.c \
..\..\apdu.c \
..\..\npdu.c \
..\..\version.c
OBJS = $(SRCS:.c=.obj) OBJS = $(SRCS:.c=.obj)
#
# Compiler definitions # Compiler definitions
# #
BCC_CFG = bcc32.cfg BCC_CFG = bcc32.cfg
CC = $(BORLAND_DIR)\bin\bcc32 +$(BCC_CFG)
#LINK = $(BORLAND_DIR)\bin\tlink32
LINK = $(BORLAND_DIR)\bin\ilink32
TLIB = $(BORLAND_DIR)\bin\tlib
# #
# Include directories # Include directories
# #
CC_DIR = $(BORLAND_DIR)\BIN CFLAGS = $(INCLUDES) $(DEFINES)
INCL_DIRS = -I$(BORLAND_DIR)\include;..\..\;..\..\demo\handler\;..\..\demo\object\;.
CFLAGS = $(INCL_DIRS) $(CS_FLAGS) $(DEFINES)
#
# Libraries # Libraries
# #
C_LIB_DIR = $(BORLAND_DIR)\lib C_LIB_DIR = $(BORLAND_DIR)\lib
LIBS = $(C_LIB_DIR)\IMPORT32.lib \ LIBS = $(BACNET_LIB) \
$(C_LIB_DIR)\CW32MT.lib $(C_LIB_DIR)\IMPORT32.lib \
$(C_LIB_DIR)\CW32MT.lib \
# #
# Main target # Main target
# #
# This should be the first one in the makefile # This should be the first one in the makefile
all : $(BCC_CFG) $(PRODUCT_EXE) all : $(BACNET_LIB) $(BCC_CFG) $(OBJS) $(PRODUCT_EXE)
del $(BCC_CFG)
install: $(PRODUCT_EXE)
copy $(PRODUCT_EXE) ..\..\utils\$(PRODUCT_EXE)
# Linker specific: the link below is for BCC linker/compiler. If you link # Linker specific: the link below is for BCC linker/compiler. If you link
# with a different linker - please change accordingly. # with a different linker - please change accordingly.
# #
# need a temp response file (@&&) because command line is too long # need a temp response file (@&&| ... |) because command line is too long
# $** lists each dependency
# $< target name
# $* target name without extension
$(PRODUCT_EXE) : $(OBJS) $(PRODUCT_EXE) : $(OBJS)
@echo Running Linker for $(PRODUCT_EXE) @echo Running Linker for $(PRODUCT_EXE)
$(LINK) -L$(C_LIB_DIR) -m -c -s -v @&&| # temp response file, starts with | $(LINK) -L$(C_LIB_DIR) -L$(BACNET_LIB_DIR) -m -c -s -v @&&|
$(BORLAND_DIR)\lib\c0x32.obj $** # $** lists each dependency $(BORLAND_DIR)\lib\c0x32.obj $**
$< $<
$*.map $*.map
$(LIBS) $(LIBS)
| # end of temp response file |
# #
# Utilities # Utilities
clean : clean :
@echo Deleting obj files, $(PRODUCT_EXE) and map files. del $(OBJS)
del *.obj
del ..\..\*.obj
del ..\..\demo\handler\*.obj
del ..\..\demo\object\*.obj
del $(PRODUCT_EXE) del $(PRODUCT_EXE)
del *.map del $(PRODUCT).map
del $(BCC_CFG) del $(BCC_CFG)
# #
@@ -130,7 +110,7 @@ clean :
# cc generic rule # cc generic rule
# #
.c.obj: .c.obj:
$(CC) -o$@ $< $(CC) +$(BCC_CFG) -o$@ $<
# Compiler configuration file # Compiler configuration file
$(BCC_CFG) : $(BCC_CFG) :