]>
Commit | Line | Data |
---|---|---|
c801d85f | 1 | # |
a1a2adef | 2 | # wxWindows/Unix main source makefile |
c801d85f KB |
3 | # |
4 | # Copyright 1998, Markus Holzhem and Robert Roebling | |
5 | # | |
6 | ||
a1a2adef | 7 | # wxWindows base directory |
c801d85f KB |
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 | |
84b46c35 GL |
17 | IODBC_C_SRC=\ |
18 | iodbc/catalog.c \ | |
19 | iodbc/connect.c \ | |
20 | iodbc/dlf.c \ | |
21 | iodbc/dlproc.c \ | |
22 | iodbc/execute.c \ | |
23 | iodbc/fetch.c \ | |
24 | iodbc/hdbc.c \ | |
25 | iodbc/henv.c \ | |
26 | iodbc/herr.c \ | |
27 | iodbc/hstmt.c \ | |
28 | iodbc/info.c \ | |
29 | iodbc/itrace.c \ | |
30 | iodbc/main.c \ | |
31 | iodbc/misc.c \ | |
32 | iodbc/prepare.c \ | |
33 | iodbc/result.c | |
c801d85f | 34 | |
a1a2adef RR |
35 | # include gtk.inc, qt.inc or motif.inc here |
36 | include @MAKEINCLUDE@ | |
c801d85f | 37 | |
f3cb6592 RR |
38 | # determine library names |
39 | STATIC_LIBRARY=lib$(LIB_TARGET).a | |
40 | SHARED_LIBRARY=lib$(LIB_TARGET).so.$(LIB_MAJOR).$(LIB_MINOR) | |
41 | ||
f3855ef0 RR |
42 | LIB_CPP_ALL_SRC=$(LIB_CPP_SRC) @UNIX_THREAD@ |
43 | # @GTK_JOYSTICK@ | |
c801d85f | 44 | |
76153302 | 45 | LIB_C_ALL_SRC=$(LIB_C_SRC) @IODBC_C_SRC@ parser.c |
6de97a3b | 46 | |
c801d85f KB |
47 | #define library objects |
48 | LIB_OBJ=\ | |
a1a2adef | 49 | $(LIB_CPP_ALL_SRC:.cpp=.o) \ |
6de97a3b | 50 | $(LIB_C_ALL_SRC:.c=.o) |
c801d85f KB |
51 | |
52 | all:: | |
6de97a3b RR |
53 | @if test ! -d gtk; then mkdir gtk; fi |
54 | @if test ! -d qt; then mkdir qt; fi | |
55 | @if test ! -d motif; then mkdir motif; fi | |
892dbe99 | 56 | @if test ! -d motif/xmcombo; then mkdir motif/xmcombo; fi |
6de97a3b RR |
57 | @if test ! -d common; then mkdir common; fi |
58 | @if test ! -d generic; then mkdir generic; fi | |
59 | @if test ! -d png; then mkdir png; fi | |
60 | @if test ! -d zlib; then mkdir zlib; fi | |
6de97a3b | 61 | @if test ! -d iodbc; then mkdir iodbc; fi |
c801d85f | 62 | |
c98f0421 | 63 | install:: |
f3cb6592 | 64 | @echo " " |
c98f0421 | 65 | @echo "Installing library files and headers.." |
f3cb6592 | 66 | @echo " " |
c98f0421 RR |
67 | @echo " Creating directories.." |
68 | @$(WXBASEDIR)/mkinstalldirs \ | |
d8c83875 RR |
69 | $(includedir)/wx \ |
70 | $(includedir)/wx/gtk \ | |
71 | $(includedir)/wx/common \ | |
72 | $(includedir)/wx/generic \ | |
73 | $(includedir)/wx/protocol \ | |
cb43b372 | 74 | $(libdir)/wx/include/wx/gtk \ |
d8c83875 RR |
75 | $(libdir) \ |
76 | $(bindir) | |
c98f0421 RR |
77 | @echo " Copying headers from /include/wx" |
78 | @cd $(WXBASEDIR)/include/wx ; \ | |
a665764c | 79 | $(INSTALL) -d $(includedir)/wx ; \ |
c98f0421 | 80 | for f in *.h ; do \ |
f3cb6592 RR |
81 | rm -f $(includedir)/wx/$$f ; \ |
82 | $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \ | |
f04371f0 RR |
83 | done ; \ |
84 | for f in *.cpp ; do \ | |
85 | rm -f $(includedir)/wx/$$f ; \ | |
86 | $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \ | |
c98f0421 RR |
87 | done |
88 | @echo " Copying headers from /include/wx/gtk" | |
89 | @cd $(WXBASEDIR)/include/wx/gtk ; \ | |
a665764c | 90 | $(INSTALL) -d $(includedir)/wx/gtk ; \ |
c98f0421 | 91 | for f in *.h ; do \ |
f3cb6592 RR |
92 | rm -f $(includedir)/wx/gtk/$$f ; \ |
93 | $(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \ | |
f04371f0 | 94 | done |
c98f0421 RR |
95 | @echo " Copying headers from /include/wx/generic" |
96 | @cd $(WXBASEDIR)/include/wx/generic ; \ | |
a665764c | 97 | $(INSTALL) -d $(includedir)/wx/generic ; \ |
c98f0421 | 98 | for f in *.h ; do \ |
f3cb6592 RR |
99 | rm -f $(includedir)/wx/generic/$$f ; \ |
100 | $(INSTALL_DATA) $$f $(includedir)/wx/generic/$$f ; \ | |
c98f0421 | 101 | done |
c058d771 RR |
102 | @echo " Copying headers from /include/wx/protocol" |
103 | @cd $(WXBASEDIR)/include/wx/protocol ; \ | |
104 | for f in *.h ; do \ | |
105 | rm -f $(includedir)/wx/protocol/$$f ; \ | |
106 | $(INSTALL_DATA) $$f $(includedir)/wx/protocol/$$f ; \ | |
107 | done | |
cb43b372 | 108 | @echo " Moving setup.h to library path" |
e52f60e6 RR |
109 | @cd $(WXBASEDIR)/src ; \ |
110 | $(INSTALL) -d $(libdir)/wx/include/wx/gtk ;\ | |
cb43b372 | 111 | mv $(includedir)/wx/gtk/setup.h $(libdir)/wx/include/wx/gtk/setup.h ; |
f3cb6592 | 112 | @echo " Copying wx-config" |
e52f60e6 RR |
113 | @cd $(WXBASEDIR)/src ; \ |
114 | $(INSTALL) -d $(bindir) ; \ | |
f3cb6592 | 115 | rm -f $(bindir)/wx-config ; \ |
e52f60e6 | 116 | $(INSTALL_PROGRAM) $(WXBASEDIR)/wx-config $(bindir)/wx-config |
f3cb6592 | 117 | @echo " Copying static library" |
e52f60e6 | 118 | @cd $(WXBASEDIR)/src ; \ |
f3cb6592 | 119 | rm -f $(libdir)/$(STATIC_LIBRARY) ; \ |
e52f60e6 | 120 | $(INSTALL_DATA) $(WXBASEDIR)/lib/$(OS)/$(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY) |
8fdca65c | 121 | @if test -f $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) ; then \ |
cb43b372 | 122 | echo " Copying shared library" ; \ |
cb43b372 | 123 | rm -f $(libdir)/lib$(LIB_TARGET).so* ; \ |
e52f60e6 | 124 | $(INSTALL_PROGRAM) $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \ |
d8c83875 RR |
125 | $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \ |
126 | $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so ; \ | |
cb43b372 RR |
127 | echo " " ; \ |
128 | echo " You may have to run ldconfig!" ; \ | |
129 | echo " " ; \ | |
d8c83875 | 130 | fi |
f3cb6592 | 131 | @echo " " |
cb43b372 | 132 | @echo "Installation complete." |
f3cb6592 RR |
133 | @echo " " |
134 | ||
c801d85f KB |
135 | clean:: |
136 | $(RM) -rf gtk | |
a1a2adef RR |
137 | $(RM) -rf qt |
138 | $(RM) -rf motif | |
c801d85f KB |
139 | $(RM) -rf common |
140 | $(RM) -rf generic | |
141 | $(RM) -rf png | |
142 | $(RM) -rf zlib | |
1a6944fd | 143 | $(RM) -rf iodbc |
6de97a3b | 144 | @$(RM) lexer.c parser.c |
c801d85f KB |
145 | |
146 | #additional things needed for compile | |
01111366 | 147 | ADD_COMPILE= |
c801d85f KB |
148 | |
149 | # include the definitions now | |
150 | include ../../template.mak | |
6de97a3b RR |
151 | |
152 | # things for the prolog stuff | |
153 | ||
154 | parser.c: ../common/parser.y lexer.c | |
155 | @if test ! -f parser.y; then \ | |
156 | cp -f ../common/parser.y . ; \ | |
157 | fi | |
158 | @$(YACC) parser.y | |
159 | @sed -e "s/y.tab.c/parser.y/g" < y.tab.c | \ | |
160 | sed -e "s/BUFSIZ/5000/g" | \ | |
161 | sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \ | |
162 | sed -e "s/yy/PROIO_yy/g" | \ | |
163 | sed -e "s/input/PROIO_input/g" | \ | |
164 | sed -e "s/unput/PROIO_unput/g" > parser.c | |
165 | @$(RM) y.tab.c | |
166 | @$(RM) parser.y | |
167 | ||
168 | lexer.c: ../common/lexer.l | |
169 | @if test ! -f lexer.l; then \ | |
170 | cp -f ../common/lexer.l . ;\ | |
171 | fi | |
172 | @$(LEX) lexer.l | |
173 | @sed -e "s/lex.yy.c/lexer.l/g" < lex.yy.c | \ | |
174 | sed -e "s/yy/PROIO_yy/g" | \ | |
175 | sed -e "s/input/PROIO_input/g" | \ | |
176 | sed -e "s/unput/PROIO_unput/g" > lexer.c | |
177 | @$(RM) lex.yy.c | |
178 | @$(RM) lexer.l | |
179 | ||
180 | clean:: | |
a665764c | 181 |