Created project and unit test for object list.

This commit is contained in:
skarg
2008-03-03 15:10:40 +00:00
parent 17b556df69
commit f9329b793d
2 changed files with 85 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="objects" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Release">
<Option output="bin\Release\objects" prefix_auto="1" extension_auto="1" />
<Option object_output="obj\Release\" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
<Add option="-DTEST" />
<Add option="-DTEST_OBJECT_LIST" />
<Add directory="..\include" />
<Add directory="." />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
</Compiler>
<Unit filename="..\include\key.h" />
<Unit filename="..\include\keylist.h" />
<Unit filename="..\include\objects.h" />
<Unit filename="..\src\key.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="..\src\keylist.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="..\src\objects.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="ctest.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="ctest.h" />
<Extensions>
<code_completion />
<envvars />
<debugger />
</Extensions>
</Project>
</CodeBlocks_project_file>
+34
View File
@@ -0,0 +1,34 @@
#Makefile to build test case
CC = gcc
SRC_DIR = ../src
INCLUDES = -I../include -I.
DEFINES = -DBIG_ENDIAN=0 -DTEST -DTEST_OBJECT_LIST
CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g
SRCS = $(SRC_DIR)/objects.c \
$(SRC_DIR)/keylist.c \
$(SRC_DIR)/key.c \
ctest.c
TARGET = rp
all: ${TARGET}
OBJS = ${SRCS:.c=.o}
${TARGET}: ${OBJS}
${CC} -o $@ ${OBJS}
.c.o:
${CC} -c ${CFLAGS} $*.c -o $@
depend:
rm -f .depend
${CC} -MM ${CFLAGS} *.c >> .depend
clean:
rm -rf core ${TARGET} $(OBJS) *.bak *.1 *.ini
include: .depend