Cleaned up Borland compile.
This commit is contained in:
+1
-1
@@ -36,7 +36,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef CRC_USE_TABLE
|
||||
#if defined(CRC_USE_TABLE)
|
||||
/* note: table is created using unit test below */
|
||||
static const uint8_t HeaderCRC[256] =
|
||||
{
|
||||
|
||||
@@ -39,7 +39,9 @@
|
||||
#include "device.h"
|
||||
#include "ai.h"
|
||||
#include "ao.h"
|
||||
#include "bacfile.h"
|
||||
#if defined(BACFILE)
|
||||
#include "bacfile.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
#if defined(BACFILE)
|
||||
void handler_atomic_read_file(uint8_t * service_request,
|
||||
uint16_t service_len,
|
||||
BACNET_ADDRESS * src, BACNET_CONFIRMED_SERVICE_DATA * service_data)
|
||||
@@ -195,3 +198,4 @@ ARF_ABORT:
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
/* Note: it does not have to be the same file=instance */
|
||||
/* that someone can read from us. It is common to */
|
||||
/* use the description as the file name. */
|
||||
#if BACFILE
|
||||
#if defined(BACFILE)
|
||||
void handler_atomic_read_file_ack(uint8_t * service_request,
|
||||
uint16_t service_len,
|
||||
BACNET_ADDRESS * src, BACNET_CONFIRMED_SERVICE_ACK_DATA * service_data)
|
||||
|
||||
@@ -39,7 +39,9 @@
|
||||
#include "awf.h"
|
||||
/* demo objects */
|
||||
#include "device.h"
|
||||
#include "bacfile.h"
|
||||
#if defined(BACFILE)
|
||||
#include "bacfile.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
from BACnet SSPC-135-2004
|
||||
@@ -70,6 +72,7 @@ of the BACnet device is a local matter and is not defined by this
|
||||
standard.
|
||||
*/
|
||||
|
||||
#if defined(BACFILE)
|
||||
void handler_atomic_write_file(uint8_t * service_request,
|
||||
uint16_t service_len,
|
||||
BACNET_ADDRESS * src, BACNET_CONFIRMED_SERVICE_DATA * service_data)
|
||||
@@ -160,3 +163,4 @@ AWF_ABORT:
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
#include "lc.h"
|
||||
#include "lsp.h"
|
||||
#include "mso.h"
|
||||
#if BACFILE
|
||||
#include "bacfile.h"
|
||||
#if defined(BACFILE)
|
||||
#include "bacfile.h"
|
||||
#endif
|
||||
|
||||
static uint8_t Temp_Buf[MAX_APDU] = { 0 };
|
||||
@@ -170,7 +170,7 @@ int Encode_Property_APDU(
|
||||
error_class, error_code);
|
||||
}
|
||||
break;
|
||||
#if BACFILE
|
||||
#if defined(BACFILE)
|
||||
case OBJECT_FILE:
|
||||
if (bacfile_valid_instance(object_instance)) {
|
||||
apdu_len = bacfile_encode_property_apdu(
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
#include "lc.h"
|
||||
#include "lsp.h"
|
||||
#include "mso.h"
|
||||
#if BACFILE
|
||||
#include "bacfile.h"
|
||||
#if defined(BACFILE)
|
||||
#include "bacfile.h"
|
||||
#endif
|
||||
|
||||
static uint8_t Temp_Buf[MAX_APDU] = { 0 };
|
||||
@@ -140,7 +140,7 @@ static void RPM_Property_List(
|
||||
break;
|
||||
case OBJECT_MULTI_STATE_OUTPUT:
|
||||
break;
|
||||
#if BACFILE
|
||||
#if defined(BACFILE)
|
||||
case OBJECT_FILE:
|
||||
BACfile_Property_Lists(
|
||||
&pPropertyList->Required.pList,
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
#include "lc.h"
|
||||
#include "lsp.h"
|
||||
#include "mso.h"
|
||||
#if BACFILE
|
||||
#include "bacfile.h"
|
||||
#if defined(BACFILE)
|
||||
#include "bacfile.h"
|
||||
#endif
|
||||
|
||||
void handler_write_property(uint8_t * service_request,
|
||||
@@ -290,7 +290,7 @@ void handler_write_property(uint8_t * service_request,
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
#if BACFILE
|
||||
#if defined(BACFILE)
|
||||
case OBJECT_FILE:
|
||||
if (bacfile_write_property(&wp_data, &error_class,
|
||||
&error_code)) {
|
||||
|
||||
@@ -75,10 +75,12 @@ static void Init_Service_Handlers(void)
|
||||
handler_read_property_multiple);
|
||||
apdu_set_confirmed_handler(SERVICE_CONFIRMED_WRITE_PROPERTY,
|
||||
handler_write_property);
|
||||
#if defined(BACFILE)
|
||||
apdu_set_confirmed_handler(SERVICE_CONFIRMED_ATOMIC_READ_FILE,
|
||||
handler_atomic_read_file);
|
||||
apdu_set_confirmed_handler(SERVICE_CONFIRMED_ATOMIC_WRITE_FILE,
|
||||
handler_atomic_write_file);
|
||||
#endif
|
||||
apdu_set_confirmed_handler(SERVICE_CONFIRMED_REINITIALIZE_DEVICE,
|
||||
handler_reinitialize_device);
|
||||
apdu_set_unconfirmed_handler
|
||||
|
||||
@@ -23,6 +23,8 @@ LINK = $(BORLAND_DIR)\bin\ilink32
|
||||
|
||||
BACNET_LIB_DIR = ..\..\lib
|
||||
BACNET_LIB = $(BACNET_LIB_DIR)\bacnet.lib
|
||||
# getting back from the library
|
||||
BACNET_DEMO_DIR = ..\demo\server
|
||||
|
||||
# directories
|
||||
BACNET_PORT = ..\..\ports\win32
|
||||
@@ -37,9 +39,9 @@ INCLUDES = \
|
||||
-I$(BORLAND_DIR)\include
|
||||
|
||||
#
|
||||
BACNET_DEFINES = -DPRINT_ENABLED=1
|
||||
#BACDL_DEFINE=-DBACDL_MSTP=1
|
||||
BACDL_DEFINE=-DBACDL_BIP=1
|
||||
BACNET_DEFINES = -DPRINT_ENABLED=1 -DBACFILE
|
||||
#BACDL_DEFINE=-DBACDL_MSTP -DCRC_USE_TABLE
|
||||
BACDL_DEFINE=-DBACDL_BIP
|
||||
DEFINES = $(BACNET_DEFINES) $(BACDL_DEFINE)
|
||||
|
||||
SRCS = main.c
|
||||
@@ -75,6 +77,12 @@ all : $(BACNET_LIB) $(BCC_CFG) $(OBJS) $(PRODUCT_EXE)
|
||||
|
||||
install: $(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
|
||||
# with a different linker - please change accordingly.
|
||||
@@ -121,14 +129,15 @@ $(CFLAGS)
|
||||
-y #include line numbers in OBJ's
|
||||
-v #include debug info
|
||||
-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
|
||||
#-M # generate link map
|
||||
#-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
|
||||
|
||||
@@ -18,10 +18,9 @@ CC = $(BORLAND_DIR)\bin\bcc32
|
||||
TLIB = $(BORLAND_DIR)\bin\tlib
|
||||
MAKE = $(BORLAND_DIR)\bin\make
|
||||
|
||||
BACNET_DEFINES = -DPRINT_ENABLED=1
|
||||
#BACDL_DEFINE=-DBACDL_ETHERNET=1
|
||||
#BACDL_DEFINE=-DBACDL_ARCNET=1
|
||||
BACDL_DEFINE=-DBACDL_BIP=1
|
||||
BACNET_DEFINES = -DPRINT_ENABLED=1 -DBACFILE
|
||||
#BACDL_DEFINE=-DBACDL_MSTP -DCRC_USE_TABLE
|
||||
#BACDL_DEFINE=-DBACDL_BIP
|
||||
DEFINES = $(BACNET_DEFINES) $(BACDL_DEFINE)
|
||||
|
||||
# directories
|
||||
@@ -142,7 +141,6 @@ LFLAGS = /E /P4096
|
||||
|
||||
all: $(BCC_CFG) $(OBJS) makefile.b32
|
||||
del $(TARGET).BAK
|
||||
del $(BCC_CFG)
|
||||
|
||||
clean:
|
||||
del ${CORE1_OBJ}
|
||||
@@ -173,14 +171,15 @@ $(BCC_CFG) :
|
||||
-y #include line numbers in OBJ's
|
||||
-v #include debug info
|
||||
-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
|
||||
#-M # generate link map
|
||||
#-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
|
||||
|
||||
Reference in New Issue
Block a user