Cleaned up Borland compile.

This commit is contained in:
skarg
2007-09-07 18:00:42 +00:00
parent 9b7db6360f
commit 0c527b8162
10 changed files with 48 additions and 30 deletions
+1 -1
View File
@@ -36,7 +36,7 @@
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
#ifdef CRC_USE_TABLE #if defined(CRC_USE_TABLE)
/* note: table is created using unit test below */ /* note: table is created using unit test below */
static const uint8_t HeaderCRC[256] = static const uint8_t HeaderCRC[256] =
{ {
+5 -1
View File
@@ -39,7 +39,9 @@
#include "device.h" #include "device.h"
#include "ai.h" #include "ai.h"
#include "ao.h" #include "ao.h"
#include "bacfile.h" #if defined(BACFILE)
#include "bacfile.h"
#endif
/* /*
from BACnet SSPC-135-2004 from BACnet SSPC-135-2004
@@ -92,6 +94,7 @@ last octet or record of the file, then the 'End Of File' parameter
shall be TRUE, otherwise FALSE. shall be TRUE, otherwise FALSE.
*/ */
#if defined(BACFILE)
void handler_atomic_read_file(uint8_t * service_request, void handler_atomic_read_file(uint8_t * service_request,
uint16_t service_len, uint16_t service_len,
BACNET_ADDRESS * src, BACNET_CONFIRMED_SERVICE_DATA * service_data) BACNET_ADDRESS * src, BACNET_CONFIRMED_SERVICE_DATA * service_data)
@@ -195,3 +198,4 @@ ARF_ABORT:
return; return;
} }
#endif
+1 -1
View File
@@ -46,7 +46,7 @@
/* Note: it does not have to be the same file=instance */ /* Note: it does not have to be the same file=instance */
/* that someone can read from us. It is common to */ /* that someone can read from us. It is common to */
/* use the description as the file name. */ /* use the description as the file name. */
#if BACFILE #if defined(BACFILE)
void handler_atomic_read_file_ack(uint8_t * service_request, void handler_atomic_read_file_ack(uint8_t * service_request,
uint16_t service_len, uint16_t service_len,
BACNET_ADDRESS * src, BACNET_CONFIRMED_SERVICE_ACK_DATA * service_data) BACNET_ADDRESS * src, BACNET_CONFIRMED_SERVICE_ACK_DATA * service_data)
+5 -1
View File
@@ -39,7 +39,9 @@
#include "awf.h" #include "awf.h"
/* demo objects */ /* demo objects */
#include "device.h" #include "device.h"
#include "bacfile.h" #if defined(BACFILE)
#include "bacfile.h"
#endif
/* /*
from BACnet SSPC-135-2004 from BACnet SSPC-135-2004
@@ -70,6 +72,7 @@ of the BACnet device is a local matter and is not defined by this
standard. standard.
*/ */
#if defined(BACFILE)
void handler_atomic_write_file(uint8_t * service_request, void handler_atomic_write_file(uint8_t * service_request,
uint16_t service_len, uint16_t service_len,
BACNET_ADDRESS * src, BACNET_CONFIRMED_SERVICE_DATA * service_data) BACNET_ADDRESS * src, BACNET_CONFIRMED_SERVICE_DATA * service_data)
@@ -160,3 +163,4 @@ AWF_ABORT:
return; return;
} }
#endif
+3 -3
View File
@@ -46,8 +46,8 @@
#include "lc.h" #include "lc.h"
#include "lsp.h" #include "lsp.h"
#include "mso.h" #include "mso.h"
#if BACFILE #if defined(BACFILE)
#include "bacfile.h" #include "bacfile.h"
#endif #endif
static uint8_t Temp_Buf[MAX_APDU] = { 0 }; static uint8_t Temp_Buf[MAX_APDU] = { 0 };
@@ -170,7 +170,7 @@ int Encode_Property_APDU(
error_class, error_code); error_class, error_code);
} }
break; break;
#if BACFILE #if defined(BACFILE)
case OBJECT_FILE: case OBJECT_FILE:
if (bacfile_valid_instance(object_instance)) { if (bacfile_valid_instance(object_instance)) {
apdu_len = bacfile_encode_property_apdu( apdu_len = bacfile_encode_property_apdu(
+3 -3
View File
@@ -48,8 +48,8 @@
#include "lc.h" #include "lc.h"
#include "lsp.h" #include "lsp.h"
#include "mso.h" #include "mso.h"
#if BACFILE #if defined(BACFILE)
#include "bacfile.h" #include "bacfile.h"
#endif #endif
static uint8_t Temp_Buf[MAX_APDU] = { 0 }; static uint8_t Temp_Buf[MAX_APDU] = { 0 };
@@ -140,7 +140,7 @@ static void RPM_Property_List(
break; break;
case OBJECT_MULTI_STATE_OUTPUT: case OBJECT_MULTI_STATE_OUTPUT:
break; break;
#if BACFILE #if defined(BACFILE)
case OBJECT_FILE: case OBJECT_FILE:
BACfile_Property_Lists( BACfile_Property_Lists(
&pPropertyList->Required.pList, &pPropertyList->Required.pList,
+3 -3
View File
@@ -46,8 +46,8 @@
#include "lc.h" #include "lc.h"
#include "lsp.h" #include "lsp.h"
#include "mso.h" #include "mso.h"
#if BACFILE #if defined(BACFILE)
#include "bacfile.h" #include "bacfile.h"
#endif #endif
void handler_write_property(uint8_t * service_request, void handler_write_property(uint8_t * service_request,
@@ -290,7 +290,7 @@ void handler_write_property(uint8_t * service_request,
#endif #endif
} }
break; break;
#if BACFILE #if defined(BACFILE)
case OBJECT_FILE: case OBJECT_FILE:
if (bacfile_write_property(&wp_data, &error_class, if (bacfile_write_property(&wp_data, &error_class,
&error_code)) { &error_code)) {
+2
View File
@@ -75,10 +75,12 @@ static void Init_Service_Handlers(void)
handler_read_property_multiple); handler_read_property_multiple);
apdu_set_confirmed_handler(SERVICE_CONFIRMED_WRITE_PROPERTY, apdu_set_confirmed_handler(SERVICE_CONFIRMED_WRITE_PROPERTY,
handler_write_property); handler_write_property);
#if defined(BACFILE)
apdu_set_confirmed_handler(SERVICE_CONFIRMED_ATOMIC_READ_FILE, apdu_set_confirmed_handler(SERVICE_CONFIRMED_ATOMIC_READ_FILE,
handler_atomic_read_file); handler_atomic_read_file);
apdu_set_confirmed_handler(SERVICE_CONFIRMED_ATOMIC_WRITE_FILE, apdu_set_confirmed_handler(SERVICE_CONFIRMED_ATOMIC_WRITE_FILE,
handler_atomic_write_file); handler_atomic_write_file);
#endif
apdu_set_confirmed_handler(SERVICE_CONFIRMED_REINITIALIZE_DEVICE, apdu_set_confirmed_handler(SERVICE_CONFIRMED_REINITIALIZE_DEVICE,
handler_reinitialize_device); handler_reinitialize_device);
apdu_set_unconfirmed_handler apdu_set_unconfirmed_handler
+17 -8
View File
@@ -23,6 +23,8 @@ LINK = $(BORLAND_DIR)\bin\ilink32
BACNET_LIB_DIR = ..\..\lib BACNET_LIB_DIR = ..\..\lib
BACNET_LIB = $(BACNET_LIB_DIR)\bacnet.lib BACNET_LIB = $(BACNET_LIB_DIR)\bacnet.lib
# getting back from the library
BACNET_DEMO_DIR = ..\demo\server
# directories # directories
BACNET_PORT = ..\..\ports\win32 BACNET_PORT = ..\..\ports\win32
@@ -37,9 +39,9 @@ INCLUDES = \
-I$(BORLAND_DIR)\include -I$(BORLAND_DIR)\include
# #
BACNET_DEFINES = -DPRINT_ENABLED=1 BACNET_DEFINES = -DPRINT_ENABLED=1 -DBACFILE
#BACDL_DEFINE=-DBACDL_MSTP=1 #BACDL_DEFINE=-DBACDL_MSTP -DCRC_USE_TABLE
BACDL_DEFINE=-DBACDL_BIP=1 BACDL_DEFINE=-DBACDL_BIP
DEFINES = $(BACNET_DEFINES) $(BACDL_DEFINE) DEFINES = $(BACNET_DEFINES) $(BACDL_DEFINE)
SRCS = main.c SRCS = main.c
@@ -76,6 +78,12 @@ all : $(BACNET_LIB) $(BCC_CFG) $(OBJS) $(PRODUCT_EXE)
install: $(PRODUCT_EXE) install: $(PRODUCT_EXE)
copy $(PRODUCT_EXE) ..\..\utils\$(PRODUCT_EXE) copy $(PRODUCT_EXE) ..\..\utils\$(PRODUCT_EXE)
$(BACNET_LIB):
cd $(BACNET_LIB_DIR)
$(MAKE) -i -f makefile.b32 clean
$(MAKE) -f makefile.b32 all
cd $(BACNET_DEMO_DIR)
# 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.
# #
@@ -121,14 +129,15 @@ $(CFLAGS)
-y #include line numbers in OBJ's -y #include line numbers in OBJ's
-v #include debug info -v #include debug info
-w+ #turn on all warnings -w+ #turn on all warnings
-Od #disable all optimizations #-Od #disable all optimizations
-O2 #disable all optimizations
-WM #multithread
#-WM- #not multithread
-w-aus # ignore warning assigned a value that is never used
-w-sig # ignore warning conversion may lose sig digits
#-a4 #32 bit data alignment #-a4 #32 bit data alignment
#-M # generate link map #-M # generate link map
#-ls # linker options #-ls # linker options
#-WM- #not multithread
-WM #multithread
-w-aus # ignore warning assigned a value that is never used
-w-sig # ignore warning conversion may lose sig digits
| $@ | $@
# EOF: makefile # EOF: makefile
+8 -9
View File
@@ -18,10 +18,9 @@ CC = $(BORLAND_DIR)\bin\bcc32
TLIB = $(BORLAND_DIR)\bin\tlib TLIB = $(BORLAND_DIR)\bin\tlib
MAKE = $(BORLAND_DIR)\bin\make MAKE = $(BORLAND_DIR)\bin\make
BACNET_DEFINES = -DPRINT_ENABLED=1 BACNET_DEFINES = -DPRINT_ENABLED=1 -DBACFILE
#BACDL_DEFINE=-DBACDL_ETHERNET=1 #BACDL_DEFINE=-DBACDL_MSTP -DCRC_USE_TABLE
#BACDL_DEFINE=-DBACDL_ARCNET=1 #BACDL_DEFINE=-DBACDL_BIP
BACDL_DEFINE=-DBACDL_BIP=1
DEFINES = $(BACNET_DEFINES) $(BACDL_DEFINE) DEFINES = $(BACNET_DEFINES) $(BACDL_DEFINE)
# directories # directories
@@ -142,7 +141,6 @@ LFLAGS = /E /P4096
all: $(BCC_CFG) $(OBJS) makefile.b32 all: $(BCC_CFG) $(OBJS) makefile.b32
del $(TARGET).BAK del $(TARGET).BAK
del $(BCC_CFG)
clean: clean:
del ${CORE1_OBJ} del ${CORE1_OBJ}
@@ -173,14 +171,15 @@ $(BCC_CFG) :
-y #include line numbers in OBJ's -y #include line numbers in OBJ's
-v #include debug info -v #include debug info
-w+ #turn on all warnings -w+ #turn on all warnings
-Od #disable all optimizations -O2 #optimization 2
-WM #multithread
-w-aus # ignore warning assigned a value that is never used
-w-sig # ignore warning conversion may lose sig digits
#-Od #disable all optimizations
#-a4 #32 bit data alignment #-a4 #32 bit data alignment
#-M # generate link map #-M # generate link map
#-ls # linker options #-ls # linker options
#-WM- #not multithread #-WM- #not multithread
-WM #multithread
-w-aus # ignore warning assigned a value that is never used
-w-sig # ignore warning conversion may lose sig digits
| $@ | $@
# EOF: makefile # EOF: makefile