Makefile 1.8 KB

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