]> git.saurik.com Git - wxWidgets.git/blob - src/Makefile.in
no message
[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 $(includedir)/wx \
52 $(includedir)/wx/gtk \
53 $(includedir)/wx/common \
54 $(includedir)/wx/generic \
55 $(includedir)/wx/protocol \
56 $(libdir)/wx/include/wx/gtk \
57 $(libdir) \
58 $(bindir)
59 @echo " Copying headers from /include/wx"
60 @cd $(WXBASEDIR)/include/wx ; \
61 $(INSTALL) -d $(includedir)/wx ; \
62 for f in *.h ; do \
63 rm -f $(includedir)/wx/$$f ; \
64 $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \
65 done
66 @echo " Copying headers from /include/wx/gtk"
67 @cd $(WXBASEDIR)/include/wx/gtk ; \
68 $(INSTALL) -d $(includedir)/wx/gtk ; \
69 for f in *.h ; do \
70 rm -f $(includedir)/wx/gtk/$$f ; \
71 $(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \
72 done ;
73 @echo " Copying headers from /include/wx/generic"
74 @cd $(WXBASEDIR)/include/wx/generic ; \
75 $(INSTALL) -d $(includedir)/wx/generic ; \
76 for f in *.h ; do \
77 rm -f $(includedir)/wx/generic/$$f ; \
78 $(INSTALL_DATA) $$f $(includedir)/wx/generic/$$f ; \
79 done
80 @echo " Copying headers from /include/wx/protocol"
81 @cd $(WXBASEDIR)/include/wx/protocol ; \
82 for f in *.h ; do \
83 rm -f $(includedir)/wx/protocol/$$f ; \
84 $(INSTALL_DATA) $$f $(includedir)/wx/protocol/$$f ; \
85 done
86 @echo " Moving setup.h to library path"
87 @$(INSTALL) -d $(libdir)/wx/include/wx/gtk ;\
88 mv $(includedir)/wx/gtk/setup.h $(libdir)/wx/include/wx/gtk/setup.h ;
89 @echo " Copying wx-config"
90 @cd $(WXBASEDIR) ; \
91 $(INSTALL) -d $(bindir) ;\
92 rm -f $(bindir)/wx-config ; \
93 $(INSTALL_PROGRAM) wx-config $(bindir)/wx-config
94 @echo " Copying static library"
95 @cd $(WXBASEDIR)/lib/$(OS) ; \
96 rm -f $(libdir)/$(STATIC_LIBRARY) ; \
97 $(INSTALL_DATA) $(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY)
98 @if test -f $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) ; then \
99 echo " Copying shared library" ; \
100 cd $(WXBASEDIR)/lib/$(OS) ; \
101 rm -f $(libdir)/lib$(LIB_TARGET).so* ; \
102 $(INSTALL_PROGRAM) $(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \
103 $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \
104 $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so ; \
105 echo " " ; \
106 echo " You may have to run ldconfig!" ; \
107 echo " " ; \
108 fi
109 @echo " "
110 @echo "Installation complete."
111 @echo " "
112
113 clean::
114 $(RM) -rf gtk
115 $(RM) -rf qt
116 $(RM) -rf motif
117 $(RM) -rf common
118 $(RM) -rf generic
119 $(RM) -rf png
120 $(RM) -rf zlib
121 $(RM) -rf gdk_imlib
122 $(RM) -rf iodbc
123 @$(RM) lexer.c parser.c
124
125 #additional things needed for compile
126 ADD_COMPILE= \
127 -DHAVE_LIBPNG -DDJPEG_PROG=\"\" -DCJPEG_PROG=\"\"
128
129 # include the definitions now
130 include ../../template.mak
131
132 # things for the prolog stuff
133
134 parser.c: ../common/parser.y lexer.c
135 @if test ! -f parser.y; then \
136 cp -f ../common/parser.y . ; \
137 fi
138 @$(YACC) parser.y
139 @sed -e "s/y.tab.c/parser.y/g" < y.tab.c | \
140 sed -e "s/BUFSIZ/5000/g" | \
141 sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \
142 sed -e "s/yy/PROIO_yy/g" | \
143 sed -e "s/input/PROIO_input/g" | \
144 sed -e "s/unput/PROIO_unput/g" > parser.c
145 @$(RM) y.tab.c
146 @$(RM) parser.y
147
148 lexer.c: ../common/lexer.l
149 @if test ! -f lexer.l; then \
150 cp -f ../common/lexer.l . ;\
151 fi
152 @$(LEX) lexer.l
153 @sed -e "s/lex.yy.c/lexer.l/g" < lex.yy.c | \
154 sed -e "s/yy/PROIO_yy/g" | \
155 sed -e "s/input/PROIO_input/g" | \
156 sed -e "s/unput/PROIO_unput/g" > lexer.c
157 @$(RM) lex.yy.c
158 @$(RM) lexer.l
159
160 clean::
161