From: Rolf K. <lab...@us...> - 2007-12-10 14:24:51
|
Update of /cvsroot/opengtoolkit/lvzip/c_source In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32177 Modified Files: lvutil.h Added Files: Makefile.vxworks Log Message: Small header file changes to support VxWorks target compilation Index: lvutil.h =================================================================== RCS file: /cvsroot/opengtoolkit/lvzip/c_source/lvutil.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lvutil.h 10 Dec 2007 13:47:36 -0000 1.3 --- lvutil.h 10 Dec 2007 14:24:54 -0000 1.4 *************** *** 32,41 **** #define BigEndian 0 #define HAVE_FCNTL ! #elif defined(VXWORKS_PPC) ! #define Unix 1 ! #define BigEndian 1 ! #elif defined(VXWORKS_X86) #define Unix 1 ! #define BigEndian 0 #endif --- 32,44 ---- #define BigEndian 0 #define HAVE_FCNTL ! #elif defined(__VXWORKS__) #define Unix 1 ! #if defined (__ppc) ! #define BigEndian 1 ! #else ! #define BigEndian 0 ! #endif ! #else ! #error No target defined #endif --- NEW FILE: Makefile.vxworks --- # These variables control the compiler and linker flags. Change them as # appropriate. DEBUG_MODE = 0 ADDED_CFLAGS = ifeq ($(DEBUG_MODE),1) OBJ_DIR := PPC603gnu_DEBUG CFLAGS = -g -mlongcall else OBJ_DIR := PPC603gnu CFLAGS = -Os -fstrength-reduce -fno-builtin -fno-strict-aliasing -mlongcall endif LINKFLAGS = $(CFLAGS) LIBPATH = # List all the *compiled* object files here, under the OBJ_DIR # directory. Make will automatically locate the source file and # compile it. OBJECTS := $(OBJ_DIR)/adler32.o $(OBJ_DIR)/compress.o $(OBJ_DIR)/crc32.o $(OBJ_DIR)/gzio.o $(OBJ_DIR)/uncompr.o \ $(OBJ_DIR)/deflate.o $(OBJ_DIR)/trees.o $(OBJ_DIR)/zutil.o $(OBJ_DIR)/inflate.o $(OBJ_DIR)/infback.o \ $(OBJ_DIR)/inftrees.o $(OBJ_DIR)/inffast.o $(OBJ_DIR)/ioapi.o $(OBJ_DIR)/iomem.o $(OBJ_DIR)/lvutil.o \ $(OBJ_DIR)/zip.o $(OBJ_DIR)/unzip.o # This is the name of the output shared library. PROJECT_TARGETS := $(OBJ_DIR)/lvzip.out # If you have other VxWorks .a files to reference, list them here. LIBS = LIBPATH = # Everything after this line should not need to be modified for # basic compilation. However, significant changes to the build structure # will probably involve modifying these lines. WIND_BASE := $(subst \,/,$(WIND_BASE)) CPU = PPC603 TOOL_FAMILY = gnu TOOL = gnu CC_ARCH_SPEC = -mcpu=603 -mstrict-align -mno-implicit-fp IDE_INCLUDES = -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip # This basic rule compiles a .c file into a .o file. It can be adapted to # all other source files that gcc can compile, including assembly (.s) and # C++ (.cpp, .cc, .C, .cxx) files. To enable support for those extensions, # copy this rule and modify its extension and compile flags for the # required source file type. $(OBJ_DIR)/%.o : %.c ccppc $(CFLAGS) $(CC_ARCH_SPEC) -ansi -Wall -MD -MP $(ADDED_CFLAGS) $(IDE_INCLUDES) $(ADDED_INCLUDES) -DCPU=$(CPU) -DTOOL_FAMILY=$(TOOL_FAMILY) -DTOOL=$(TOOL) -D_WRS_KERNEL $(DEFINES) -o "$@" -c "$<" # Adapted rule for .cpp files $(OBJ_DIR)/%.o : %.cpp c++ppc $(CFLAGS) $(CC_ARCH_SPEC) -ansi -Wall -MD -MP $(ADDED_CFLAGS) $(IDE_INCLUDES) $(ADDED_INCLUDES) -DCPU=$(CPU) -DTOOL_FAMILY=$(TOOL_FAMILY) -DTOOL=$(TOOL) -D_WRS_KERNEL $(DEFINES) -o "$@" -c "$<" all : check_objectdir $(PROJECT_TARGETS) $(PROJECT_TARGETS) : $(OBJECTS) rm -f "$@" ctdt.c;nmppc $(OBJECTS) | tclsh $(WIND_BASE)/host/resource/hutils/tcl/munch.tcl -c ppc > ctdt.c ccppc $(LINKFLAGS) $(CC_ARCH_SPEC) -fdollars-in-identifiers -Wall $(ADDED_CFLAGS) $(IDE_INCLUDES) $(ADDED_INCLUDES) -DCPU=$(CPU) -DTOOL_FAMILY=$(TOOL_FAMILY) -DTOOL=$(TOOL) -D_WRS_KERNEL $(DEFINES) -o ctdt.o -c ctdt.c ccppc -r -nostdlib -Wl,-X -T $(WIND_BASE)/target/h/tool/gnu/ldscripts/link.OUT -o "$@" $(OBJECTS) $(LIBPATH) $(LIBS) $(ADDED_LIBPATH) $(ADDED_LIBS) ctdt.o rm -f ctdt.c ctdt.o check_objectdir : @if [ ! -d "$(OBJ_DIR)" ]; then\ mkdir -p $(OBJ_DIR);\ fi clean : rm -f $(OBJECTS) $(PROJECT_TARGETS) $(wildcard $(OBJ_DIR)/*.unstripped) .DUMMY: check_objectdir clean |