Daniel Veillard | 63806b5 | 2008-06-10 14:56:11 +0000 | [diff] [blame] | 1 | ##----------------------------------------------------------------
|
| 2 | ##
|
| 3 | ##-- Filename: Makefile
|
| 4 | ##
|
| 5 | ##-- $Date: 2008/02/23 02:56:17 $
|
| 6 | ##-- $Revision: 1.2 $
|
| 7 | ##-- $Name: $
|
| 8 | ##
|
| 9 | ##----------------------------------------------------------------
|
| 10 |
|
| 11 | NAME = xml2
|
| 12 | TOOL_FAMILY=gnu
|
| 13 |
|
| 14 | include $(WIND_USR)/tool/gnu/make.$(VXCPU)
|
| 15 |
|
| 16 | FLAGS = -Wall -g -Isrc -Isrc/include -D_REENTRANT=1
|
| 17 | #FLAGS = -Wall -O2 -Isrc -Isrc/include -D_REENTRANT=1
|
| 18 |
|
| 19 | FLAGS += $(DEFINE_CC) $(CC_ARCH_SPEC) -MD -MP -D_VX_CPU=_VX_$(CPU) -D_VX_TOOL_FAMILY=gnu -D_VX_TOOL=$(TOOL)
|
| 20 | ifeq ($(VXTYPE),RTP)
|
| 21 | FLAGS += -mrtp -fpic -I$(WIND_USR)/h -I$(WIND_USR)/h/wrn/coreip
|
| 22 | else
|
| 23 | FLAGS += -D_WRS_KERNEL -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip
|
| 24 | endif
|
| 25 |
|
| 26 | ifeq ($(VXTYPE),RTP)
|
| 27 | ifeq ($(CPU),SH32)
|
| 28 | LIB_LDFLAGS += -L$(WIND_USR)/lib/sh/SH32/commonle/PIC
|
| 29 | else
|
| 30 | LIB_LDFLAGS += $(LD_LINK_PATH_ATEND) $(LD_PARTIAL_LAST_FLAGS)
|
| 31 | endif
|
| 32 | endif
|
| 33 |
|
| 34 | OBJS = c14n.o catalog.o chvalid.o \
|
| 35 | debugXML.o dict.o DOCBparser.o \
|
| 36 | encoding.o entities.o error.o \
|
| 37 | globals.o \
|
| 38 | hash.o \
|
| 39 | legacy.o list.o \
|
| 40 | parser.o parserInternals.o pattern.o \
|
| 41 | relaxng.o \
|
| 42 | SAX2.o SAX.o schematron.o \
|
| 43 | threads.o tree.o \
|
| 44 | uri.o \
|
| 45 | valid.o \
|
| 46 | xinclude.o xlink.o xmlcatalog.o xmlIO.o \
|
| 47 | xmlmemory.o xmlmodule.o xmlreader.o xmlregexp.o \
|
| 48 | xmlsave.o xmlschemas.o xmlschemastypes.o xmlstring.o \
|
| 49 | xmlunicode.o xmlwriter.o xpath.o xpointer.o
|
| 50 |
|
| 51 | all : lib$(NAME).so
|
| 52 |
|
| 53 | init :
|
| 54 | mkdir -p objs
|
| 55 |
|
| 56 | .PHONY : lib$(NAME).so
|
| 57 |
|
| 58 | lib$(NAME).so : init $(patsubst %.o, objs/%.o, $(OBJS))
|
| 59 | $(CC) $(FLAGS) $(LIB_LDFLAGS) -shared -o $@ $(patsubst %.o, objs/%.o, $(OBJS))
|
| 60 |
|
| 61 | (NAME).out : init $(patsubst %.o, objs/%.o, $(OBJS))
|
| 62 | $(CC) $(FLAGS) -o $@ $(patsubst %.o, objs/%.o, $(OBJS))
|
| 63 |
|
| 64 | objs/%.o: src/%.c
|
| 65 | $(CC) $(FLAGS) -o $@ -c $<
|
| 66 |
|
| 67 | clean:
|
| 68 | rm -fR *.so objs
|