removed wxsetup.h from libdir
[wxWidgets.git] / src / Makefile.in
1 #
2 # wxWindows/Unix main source makefile
3 #
4 # Copyright 1998, Markus Holzhem and Robert Roebling
5 #
6
7 # wxWindows base directory
8 WXBASEDIR=@WXBASEDIR@
9
10 # set the OS type for compilation
11 OS=@OS@
12
13 # compile a library only
14 RULE=gslib
15
16 # define common stuff
17
18 # include gtk.inc, qt.inc or motif.inc here
19 include @MAKEINCLUDE@
20
21 # determine library names
22 STATIC_LIBRARY=lib$(LIB_TARGET).a
23 SHARED_LIBRARY=lib$(LIB_TARGET).so.$(LIB_MAJOR).$(LIB_MINOR)
24
25 LIB_CPP_ALL_SRC=$(LIB_CPP_SRC) @GTK_JOYSTICK@ @UNIX_THREAD@
26
27 LIB_C_ALL_SRC=$(LIB_C_SRC) parser.c
28
29 #define library objects
30 LIB_OBJ=\
31 $(LIB_CPP_ALL_SRC:.cpp=.o) \
32 $(LIB_C_ALL_SRC:.c=.o)
33
34 all::
35 @if test ! -d gtk; then mkdir gtk; fi
36 @if test ! -d qt; then mkdir qt; fi
37 @if test ! -d motif; then mkdir motif; fi
38 @if test ! -d common; then mkdir common; fi
39 @if test ! -d generic; then mkdir generic; fi
40 @if test ! -d png; then mkdir png; fi
41 @if test ! -d zlib; then mkdir zlib; fi
42 @if test ! -d gdk_imlib; then mkdir gdk_imlib; fi
43 @if test ! -d iodbc; then mkdir iodbc; fi
44
45 install::
46 @echo " "
47 @echo "Installing library files and headers.."
48 @echo " "
49 @echo " Creating directories.."
50 @$(WXBASEDIR)/mkinstalldirs \
51 @prefix@/include/wx \
52 @prefix@/include/wx/gtk \
53 @prefix@/include/wx/common \
54 @prefix@/include/wx/generic \
55 @prefix@/include/wx/protocol \
56 @echo " Copying headers from /include/wx"
57 @cd $(WXBASEDIR)/include/wx ; \
58 $(INSTALL) -d $(includedir)/wx ; \
59 for f in *.h ; do \
60 rm -f $(includedir)/wx/$$f ; \
61 $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \
62 done
63 @echo " Copying headers from /include/wx/gtk"
64 @cd $(WXBASEDIR)/include/wx/gtk ; \
65 $(INSTALL) -d $(includedir)/wx/gtk ; \
66 for f in *.h ; do \
67 rm -f $(includedir)/wx/gtk/$$f ; \
68 $(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \
69 done ; \
70 $(INSTALL) -d $(includedir)/wx/@host@/wx/gtk ;\
71 mv $(includedir)/wx/gtk/setup.h $(includedir)/wx/@host@/wx/gtk/setup.h ;\
72 @echo " Copying headers from /include/wx/generic"
73 @cd $(WXBASEDIR)/include/wx/generic ; \
74 $(INSTALL) -d $(includedir)/wx/generic ; \
75 for f in *.h ; do \
76 rm -f $(includedir)/wx/generic/$$f ; \
77 $(INSTALL_DATA) $$f $(includedir)/wx/generic/$$f ; \
78 done
79 @echo " Copying headers from /include/wx/protocol"
80 @cd $(WXBASEDIR)/include/wx/protocol ; \
81 for f in *.h ; do \
82 rm -f $(includedir)/wx/protocol/$$f ; \
83 $(INSTALL_DATA) $$f $(includedir)/wx/protocol/$$f ; \
84 done
85 @echo " Copying wx-config"
86 @cd $(WXBASEDIR) ; \
87 $(INSTALL) -d $(bindir) ;\
88 rm -f $(bindir)/wx-config ; \
89 $(INSTALL_PROGRAM) wx-config $(bindir)/wx-config
90 @echo " Copying static library"
91 $(INSTALL) -d $(libdir) ;\
92 @cd $(WXBASEDIR)/lib/$(OS) ; \
93 rm -f $(libdir)/$(STATIC_LIBRARY) ; \
94 $(INSTALL_DATA) $(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY)
95 @echo " Copying shared library"
96 @cd $(WXBASEDIR)/lib/$(OS) ; \
97 rm -f $(libdir)/$(SHARED_LIBRARY) ; \
98 $(INSTALL_PROGRAM) $(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \
99 $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \
100 $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so
101 @echo " "
102 @echo "Installation complete. You may have to run ldconfig!"
103 @echo " "
104
105
106 clean::
107 $(RM) -rf gtk
108 $(RM) -rf qt
109 $(RM) -rf motif
110 $(RM) -rf common
111 $(RM) -rf generic
112 $(RM) -rf png
113 $(RM) -rf zlib
114 $(RM) -rf gdk_imlib
115 $(RM) -rf iodbc
116 @$(RM) lexer.c parser.c
117
118 #additional things needed for compile
119 ADD_COMPILE= \
120 -DHAVE_LIBPNG -DDJPEG_PROG=\"\" -DCJPEG_PROG=\"\"
121
122 # include the definitions now
123 include ../../template.mak
124
125 # things for the prolog stuff
126
127 parser.c: ../common/parser.y lexer.c
128 @if test ! -f parser.y; then \
129 cp -f ../common/parser.y . ; \
130 fi
131 @$(YACC) parser.y
132 @sed -e "s/y.tab.c/parser.y/g" < y.tab.c | \
133 sed -e "s/BUFSIZ/5000/g" | \
134 sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \
135 sed -e "s/yy/PROIO_yy/g" | \
136 sed -e "s/input/PROIO_input/g" | \
137 sed -e "s/unput/PROIO_unput/g" > parser.c
138 @$(RM) y.tab.c
139 @$(RM) parser.y
140
141 lexer.c: ../common/lexer.l
142 @if test ! -f lexer.l; then \
143 cp -f ../common/lexer.l . ;\
144 fi
145 @$(LEX) lexer.l
146 @sed -e "s/lex.yy.c/lexer.l/g" < lex.yy.c | \
147 sed -e "s/yy/PROIO_yy/g" | \
148 sed -e "s/input/PROIO_input/g" | \
149 sed -e "s/unput/PROIO_unput/g" > lexer.c
150 @$(RM) lex.yy.c
151 @$(RM) lexer.l
152
153 clean::
154