9 # dxflib installation directories
12 INCDIR = @prefix@/include/dxflib
16 #LIBDIR = $(DESTDIR)$(PREFIX)/lib
17 #INCDIR = $(DESTDIR)$(PREFIX)/include/dxflib
20 #LIBDIR = $(HOME)/local/lib
21 #INCDIR = $(HOME)/local/include/dxflib
24 #------------------------ do not edit ------------------------
30 CFLAGS = -I./src @CFLAGS@ @DEFS@
32 INSTALL_DATA = @INSTALL_DATA@
34 MAKEDEPEND = @MAKEDEPEND@
41 $(BASE_DIR)/dl_dxf.cpp \
42 $(BASE_DIR)/dl_writer_ascii.cpp
45 $(BASE_DIR)/dl_attributes.h \
46 $(BASE_DIR)/dl_codes.h \
47 $(BASE_DIR)/dl_creationadapter.h \
48 $(BASE_DIR)/dl_creationinterface.h \
49 $(BASE_DIR)/dl_dxf.h \
50 $(BASE_DIR)/dl_entities.h \
51 $(BASE_DIR)/dl_exception.h \
52 $(BASE_DIR)/dl_extrusion.h \
53 $(BASE_DIR)/dl_writer.h \
54 $(BASE_DIR)/dl_writer_ascii.h
62 $(CXX) $(CFLAGS) -c $< -o $@
65 all: prepare ./lib/libdxf.a
68 test -d ./include || mkdir -p ./include
69 -( cd ./include; rm -f *.h; \
70 for hf in `find ../src -name '*.h'`; do \
71 if [ "x$$OS" = "xWindows_NT" ]; then \
74 ln -s "$$hf" 2> /dev/null; \
78 shared: ./lib/libdxf.so.$(VERSION)
81 ./lib/libdxf.a: $(OBJ)
82 test -d ./lib || mkdir ./lib
83 $(AR) $(ARFLAGS) ./lib/libdxf.a $(OBJ)
85 ./lib/libdxf.so.$(VERSION): $(OBJ)
86 test -d ./lib || mkdir ./lib
87 $(CC) -p -shared -o ./lib/libdxf.so.$(VERSION) $(OBJ) -lc -lm
88 -(cd ./lib ; ln -s libdxf.so.$(VERSION) libdxf.so)
90 install: ./lib/libdxf.a
91 test -d $(LIBDIR) || mkdir -p $(LIBDIR)
92 test -d $(INCDIR) || mkdir -p $(INCDIR)
93 $(INSTALL_DATA) ./lib/libdxf.a $(LIBDIR)
94 #-(ln -s $(LIBDIR)/libdxf.a $(LIBDIR)/libdxf.a)
95 for IFILE in $(INS); do \
96 $(INSTALL_DATA) $$IFILE $(INCDIR); \
99 install-shared: ./lib/libdxf.so.$(VERSION)
100 test -d $(LIBDIR) || mkdir -p $(LIBDIR)
101 test -d $(INCDIR) || mkdir -p $(INCDIR)
102 #$(INSTALL_DATA) ./lib/libdxf.so.$(VERSION) $(LIBDIR)
103 -(ln -s $(LIBDIR)/libdxf.so.$(VERSION) $(LIBDIR)/libdxf.so)
104 for IFILE in $(INS); do \
105 $(INSTALL_DATA) $$IFILE $(INCDIR); \
109 -(cd ./test ; make clean)
111 -rm -f ./lib/lib* Makefile.bak
112 -rm -f ./include/dxflib/*.h
113 -$(FIND) . -name "*~" -exec rm -f {} \;
114 -rm -f ./lib/libdxf.a
117 -rm -f Makefile configure
119 testing: ./lib/libdxf.a
123 -(doxygen ./doxygen.cfg)
126 #-rm -r ./doc/classref/html/en/*
127 -rm -r ./distribution/dxflib/*
128 test -d ./distribution/dxflib || mkdir -p ./distribution/dxflib
129 mkdir -p ./distribution/dxflib/doc
130 -(cp -r ./src ./test ./distribution/dxflib/)
131 -(cp -r ./doc/classref ./distribution/dxflib/doc/)
132 -(cp * ./distribution/dxflib/)
133 -(cd ./distribution/dxflib; rm config.log config.cache reinstall*; mkdir lib include)
134 -(cd ./distribution; tar fvcz dxflib-$(VERSION).tar.gz dxflib)
137 $(MAKEDEPEND) -- $(CFLAGS) -- $(SRC)
139 @echo "Run 'make' to build dxflib library."
142 # DO NOT DELETE THIS LINE -- make depend depends on it.