Moved the demo objects into demo/object directory, and updated the makefiles and unit tests to handle the move.

This commit is contained in:
skarg
2006-01-10 20:36:30 +00:00
parent 3c1cc848a6
commit d7ed1480fe
21 changed files with 53 additions and 54 deletions
+11 -8
View File
@@ -6,10 +6,13 @@ BASEDIR = .
#CFLAGS = -Wall -I. -O2 -g #CFLAGS = -Wall -I. -O2 -g
# Note: you can strip out symbols using the strip command # Note: you can strip out symbols using the strip command
# to get an idea of how big the compile really is. # to get an idea of how big the compile really is.
#CFLAGS = -Wall -I. -Iports/linux -g -DBACFILE=1 -DBACDL_ETHERNET=1 #DEFINES = -DBACFILE=1 -DBACDL_ETHERNET=1
#CFLAGS = -Wall -I. -Iports/linux -g -DBACFILE=1 -DBACDL_ARCNET=1 #DEFINES = -DBACFILE=1 -DBACDL_ARCNET=1
#CFLAGS = -Wall -I. -Iports/linux -g -DBACFILE=1 -DBACDL_MSTP=1 #DEFINES = -DBACFILE=1 -DBACDL_MSTP=1
CFLAGS = -Wall -I. -Iports/linux -g -DBACFILE=1 -DBACDL_BIP=1 DEFINES = -DBACFILE=1 -DBACDL_BIP=1
INCLUDES = -I. -Iports/linux -Idemo/object
CFLAGS = -Wall -g $(INCLUDES) $(DEFINES)
SRCS = ports/linux/main.c \ SRCS = ports/linux/main.c \
ports/linux/ethernet.c \ ports/linux/ethernet.c \
@@ -30,10 +33,10 @@ SRCS = ports/linux/main.c \
tsm.c \ tsm.c \
datalink.c \ datalink.c \
address.c \ address.c \
device.c \ demo/object/device.c \
ai.c \ demo/object/ai.c \
ao.c \ demo/object/ao.c \
bacfile.c \ demo/object/bacfile.c \
arf.c \ arf.c \
awf.c \ awf.c \
abort.c \ abort.c \
+3 -3
View File
@@ -1,10 +1,10 @@
#Makefile to build test case #Makefile to build test case
CC = gcc CC = gcc
BASEDIR = . BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb # -g for debugging with gdb
#CFLAGS = -Wall -I. -g DEFINES = -DBACFILE=1 -DBACDL_BIP=1 -DTEST -DTEST_ATOMIC_READ_FILE
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_ATOMIC_READ_FILE -DBACDL_BIP=1 -g INCLUDES = -I. -Idemo/object -Itest
CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g
SRCS = bacdcode.c \ SRCS = bacdcode.c \
bacstr.c \ bacstr.c \
+4 -4
View File
@@ -1,10 +1,10 @@
#Makefile to build test case #Makefile to build test case
CC = gcc CC = gcc
BASEDIR = . BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb DEFINES = -DBACFILE=1 -DBACDL_BIP=1 -DTEST -DTEST_ATOMIC_WRITE_FILE
#CFLAGS = -Wall -I. -g INCLUDES = -I. -Idemo/object -Itest
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_ATOMIC_WRITE_FILE -DBACDL_BIP=1 -g CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g
SRCS = bacdcode.c \ SRCS = bacdcode.c \
bacstr.c \ bacstr.c \
-6
View File
@@ -39,12 +39,6 @@
// However, it could handle multiple data links with the // However, it could handle multiple data links with the
// addition of passing a network number or datalink number // addition of passing a network number or datalink number
// as part of the calls. // as part of the calls.
#if defined(BACDL_ARCNET) || defined(BACDL_MSTP) || \
defined(BACDL_ETHERNET) || defined(BACDL_BIP)
/* valid! */
#else
#error BACDL_ARCNET, BACDL_MSTP, BACDL_ETHERNET, or BACDL_BIP must be defined!
#endif
/* returns number of bytes sent on success, negative on failure */ /* returns number of bytes sent on success, negative on failure */
int datalink_send_pdu( int datalink_send_pdu(
@@ -6,10 +6,11 @@ BASEDIR = .
#CFLAGS = -Wall -I. -g #CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_ANALOG_INPUT -g CFLAGS = -Wall -I. -Itest -DTEST -DTEST_ANALOG_INPUT -g
# NOTE: this file is normally called by the unittest.sh from up directory
SRCS = bacdcode.c \ SRCS = bacdcode.c \
bacstr.c \ bacstr.c \
bigend.c \ bigend.c \
ai.c \ demo/object/ai.c \
test/ctest.c test/ctest.c
OBJS = ${SRCS:.c=.o} OBJS = ${SRCS:.c=.o}
@@ -6,10 +6,11 @@ BASEDIR = .
#CFLAGS = -Wall -I. -g #CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_ANALOG_OUTPUT -g CFLAGS = -Wall -I. -Itest -DTEST -DTEST_ANALOG_OUTPUT -g
# NOTE: this file is normally called by the unittest.sh from up directory
SRCS = bacdcode.c \ SRCS = bacdcode.c \
bacstr.c \ bacstr.c \
bigend.c \ bigend.c \
ao.c \ demo/object/ao.c \
test/ctest.c test/ctest.c
OBJS = ${SRCS:.c=.o} OBJS = ${SRCS:.c=.o}
@@ -6,10 +6,11 @@ BASEDIR = .
#CFLAGS = -Wall -I. -g #CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_DEVICE -g CFLAGS = -Wall -I. -Itest -DTEST -DTEST_DEVICE -g
# NOTE: this file is normally called by the unittest.sh from up directory
SRCS = bacdcode.c \ SRCS = bacdcode.c \
bigend.c \ bigend.c \
bacstr.c \ bacstr.c \
device.c \ demo/object/device.c \
test/ctest.c test/ctest.c
OBJS = ${SRCS:.c=.o} OBJS = ${SRCS:.c=.o}
+3 -3
View File
@@ -1,10 +1,10 @@
#Makefile to build test case #Makefile to build test case
CC = gcc CC = gcc
BASEDIR = . BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb # -g for debugging with gdb
#CFLAGS = -Wall -I. -g DEFINES = -DBACFILE=1 -DTEST -DTEST_IAM
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_IAM -g INCLUDES = -I. -Idemo/object -Itest
CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g
SRCS = bacdcode.c \ SRCS = bacdcode.c \
bacstr.c \ bacstr.c \
+4 -4
View File
@@ -40,10 +40,10 @@ SRCS = init.c main.c ethernet.c bip-init.c \
..\..\wp.c \ ..\..\wp.c \
..\..\arf.c \ ..\..\arf.c \
..\..\awf.c \ ..\..\awf.c \
..\..\bacfile.c \ ..\..\demo\object\bacfile.c \
..\..\device.c \ ..\..\demo\object\device.c \
..\..\ai.c \ ..\..\demo\object\ai.c \
..\..\ao.c \ ..\..\demo\object\ao.c \
..\..\datalink.c \ ..\..\datalink.c \
..\..\tsm.c \ ..\..\tsm.c \
..\..\address.c \ ..\..\address.c \
+4 -4
View File
@@ -32,10 +32,10 @@ SRCS = main.c bip-init.c \
..\..\wp.c \ ..\..\wp.c \
..\..\arf.c \ ..\..\arf.c \
..\..\awf.c \ ..\..\awf.c \
..\..\bacfile.c \ ..\..\demo\object\bacfile.c \
..\..\device.c \ ..\..\demo\object\device.c \
..\..\ai.c \ ..\..\demo\object\ai.c \
..\..\ao.c \ ..\..\demo\object\ao.c \
..\..\datalink.c \ ..\..\datalink.c \
..\..\tsm.c \ ..\..\tsm.c \
..\..\address.c \ ..\..\address.c \
+6 -7
View File
@@ -1,18 +1,17 @@
#Makefile to build test case #Makefile to build test case
CC = gcc CC = gcc
BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb # -g for debugging with gdb
#CFLAGS = -Wall -I. -g DEFINES = -DTEST -DTEST_TSM
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_TSM -g INCLUDES = -I. -Idemo/object -Itest -Iports/linux
CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g
SRCS = address.c \ SRCS = address.c \
bacdcode.c \ bacdcode.c \
bacstr.c \ bacstr.c \
bigend.c \ bigend.c \
device.c \ demo/object/device.c \
ai.c \ demo/object/ai.c \
ao.c \ demo/object/ao.c \
iam.c \ iam.c \
npdu.c \ npdu.c \
apdu.c \ apdu.c \
@@ -14,15 +14,15 @@ make -f address.mak
./address >> test.log ./address >> test.log
make -f address.mak clean make -f address.mak clean
make -f ai.mak clean make -f demo/object/ai.mak clean
make -f ai.mak make -f demo/object/ai.mak
./analog_input >> test.log ./analog_input >> test.log
make -f ai.mak clean make -f demo/object/ai.mak clean
make -f ao.mak clean make -f demo/object/ao.mak clean
make -f ao.mak make -f demo/object/ao.mak
./analog_output >> test.log ./analog_output >> test.log
make -f ao.mak clean make -f demo/object/ao.mak clean
make -f arf.mak clean make -f arf.mak clean
make -f arf.mak make -f arf.mak
@@ -59,10 +59,10 @@ make -f crc.mak
./crc >> test.log ./crc >> test.log
make -f crc.mak clean make -f crc.mak clean
make -f device.mak clean make -f demo/object/device.mak clean
make -f device.mak make -f demo/object/device.mak
./device >> test.log ./device >> test.log
make -f device.mak clean make -f demo/object/device.mak clean
make -f iam.mak clean make -f iam.mak clean
make -f iam.mak make -f iam.mak
+3 -3
View File
@@ -1,10 +1,10 @@
#Makefile to build test case #Makefile to build test case
CC = gcc CC = gcc
BASEDIR = . BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb # -g for debugging with gdb
#CFLAGS = -Wall -I. -g DEFINES = -DBACFILE=1 -DBACDL_BIP=1 -DTEST -DTEST_WRITE_PROPERTY
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_WRITE_PROPERTY -DBACDL_BIP=1 -g INCLUDES = -I. -Idemo/object -Itest
CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g
SRCS = bacdcode.c \ SRCS = bacdcode.c \
bacstr.c \ bacstr.c \