]>
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 | ||
a1a2adef | 42 | LIB_CPP_ALL_SRC=$(LIB_CPP_SRC) @GTK_JOYSTICK@ @UNIX_THREAD@ |
c801d85f | 43 | |
84b46c35 | 44 | LIB_C_ALL_SRC=$(LIB_C_SRC) @IOBC_C_SRC@ parser.c |
6de97a3b | 45 | |
c801d85f KB |
46 | #define library objects |
47 | LIB_OBJ=\ | |
a1a2adef | 48 | $(LIB_CPP_ALL_SRC:.cpp=.o) \ |
6de97a3b | 49 | $(LIB_C_ALL_SRC:.c=.o) |
c801d85f KB |
50 | |
51 | all:: | |
6de97a3b RR |
52 | @if test ! -d gtk; then mkdir gtk; fi |
53 | @if test ! -d qt; then mkdir qt; fi | |
54 | @if test ! -d motif; then mkdir motif; fi | |
55 | @if test ! -d common; then mkdir common; fi | |
56 | @if test ! -d generic; then mkdir generic; fi | |
57 | @if test ! -d png; then mkdir png; fi | |
58 | @if test ! -d zlib; then mkdir zlib; fi | |
6de97a3b | 59 | @if test ! -d iodbc; then mkdir iodbc; fi |
c801d85f | 60 | |
c98f0421 | 61 | install:: |
f3cb6592 | 62 | @echo " " |
c98f0421 | 63 | @echo "Installing library files and headers.." |
f3cb6592 | 64 | @echo " " |
c98f0421 RR |
65 | @echo " Creating directories.." |
66 | @$(WXBASEDIR)/mkinstalldirs \ | |
d8c83875 RR |
67 | $(includedir)/wx \ |
68 | $(includedir)/wx/gtk \ | |
69 | $(includedir)/wx/common \ | |
70 | $(includedir)/wx/generic \ | |
71 | $(includedir)/wx/protocol \ | |
cb43b372 | 72 | $(libdir)/wx/include/wx/gtk \ |
d8c83875 RR |
73 | $(libdir) \ |
74 | $(bindir) | |
c98f0421 RR |
75 | @echo " Copying headers from /include/wx" |
76 | @cd $(WXBASEDIR)/include/wx ; \ | |
a665764c | 77 | $(INSTALL) -d $(includedir)/wx ; \ |
c98f0421 | 78 | for f in *.h ; do \ |
f3cb6592 RR |
79 | rm -f $(includedir)/wx/$$f ; \ |
80 | $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \ | |
c98f0421 RR |
81 | done |
82 | @echo " Copying headers from /include/wx/gtk" | |
83 | @cd $(WXBASEDIR)/include/wx/gtk ; \ | |
a665764c | 84 | $(INSTALL) -d $(includedir)/wx/gtk ; \ |
c98f0421 | 85 | for f in *.h ; do \ |
f3cb6592 RR |
86 | rm -f $(includedir)/wx/gtk/$$f ; \ |
87 | $(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \ | |
d8c83875 | 88 | done ; |
c98f0421 RR |
89 | @echo " Copying headers from /include/wx/generic" |
90 | @cd $(WXBASEDIR)/include/wx/generic ; \ | |
a665764c | 91 | $(INSTALL) -d $(includedir)/wx/generic ; \ |
c98f0421 | 92 | for f in *.h ; do \ |
f3cb6592 RR |
93 | rm -f $(includedir)/wx/generic/$$f ; \ |
94 | $(INSTALL_DATA) $$f $(includedir)/wx/generic/$$f ; \ | |
c98f0421 | 95 | done |
c058d771 RR |
96 | @echo " Copying headers from /include/wx/protocol" |
97 | @cd $(WXBASEDIR)/include/wx/protocol ; \ | |
98 | for f in *.h ; do \ | |
99 | rm -f $(includedir)/wx/protocol/$$f ; \ | |
100 | $(INSTALL_DATA) $$f $(includedir)/wx/protocol/$$f ; \ | |
101 | done | |
cb43b372 RR |
102 | @echo " Moving setup.h to library path" |
103 | @$(INSTALL) -d $(libdir)/wx/include/wx/gtk ;\ | |
104 | mv $(includedir)/wx/gtk/setup.h $(libdir)/wx/include/wx/gtk/setup.h ; | |
f3cb6592 RR |
105 | @echo " Copying wx-config" |
106 | @cd $(WXBASEDIR) ; \ | |
a665764c | 107 | $(INSTALL) -d $(bindir) ;\ |
f3cb6592 RR |
108 | rm -f $(bindir)/wx-config ; \ |
109 | $(INSTALL_PROGRAM) wx-config $(bindir)/wx-config | |
110 | @echo " Copying static library" | |
c98f0421 | 111 | @cd $(WXBASEDIR)/lib/$(OS) ; \ |
f3cb6592 RR |
112 | rm -f $(libdir)/$(STATIC_LIBRARY) ; \ |
113 | $(INSTALL_DATA) $(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY) | |
8fdca65c | 114 | @if test -f $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) ; then \ |
cb43b372 | 115 | echo " Copying shared library" ; \ |
d8c83875 | 116 | cd $(WXBASEDIR)/lib/$(OS) ; \ |
cb43b372 | 117 | rm -f $(libdir)/lib$(LIB_TARGET).so* ; \ |
d8c83875 RR |
118 | $(INSTALL_PROGRAM) $(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \ |
119 | $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \ | |
120 | $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so ; \ | |
cb43b372 RR |
121 | echo " " ; \ |
122 | echo " You may have to run ldconfig!" ; \ | |
123 | echo " " ; \ | |
d8c83875 | 124 | fi |
f3cb6592 | 125 | @echo " " |
cb43b372 | 126 | @echo "Installation complete." |
f3cb6592 RR |
127 | @echo " " |
128 | ||
c801d85f KB |
129 | clean:: |
130 | $(RM) -rf gtk | |
a1a2adef RR |
131 | $(RM) -rf qt |
132 | $(RM) -rf motif | |
c801d85f KB |
133 | $(RM) -rf common |
134 | $(RM) -rf generic | |
135 | $(RM) -rf png | |
136 | $(RM) -rf zlib | |
1a6944fd | 137 | $(RM) -rf iodbc |
6de97a3b | 138 | @$(RM) lexer.c parser.c |
c801d85f KB |
139 | |
140 | #additional things needed for compile | |
01111366 | 141 | ADD_COMPILE= |
c801d85f KB |
142 | |
143 | # include the definitions now | |
144 | include ../../template.mak | |
6de97a3b RR |
145 | |
146 | # things for the prolog stuff | |
147 | ||
148 | parser.c: ../common/parser.y lexer.c | |
149 | @if test ! -f parser.y; then \ | |
150 | cp -f ../common/parser.y . ; \ | |
151 | fi | |
152 | @$(YACC) parser.y | |
153 | @sed -e "s/y.tab.c/parser.y/g" < y.tab.c | \ | |
154 | sed -e "s/BUFSIZ/5000/g" | \ | |
155 | sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \ | |
156 | sed -e "s/yy/PROIO_yy/g" | \ | |
157 | sed -e "s/input/PROIO_input/g" | \ | |
158 | sed -e "s/unput/PROIO_unput/g" > parser.c | |
159 | @$(RM) y.tab.c | |
160 | @$(RM) parser.y | |
161 | ||
162 | lexer.c: ../common/lexer.l | |
163 | @if test ! -f lexer.l; then \ | |
164 | cp -f ../common/lexer.l . ;\ | |
165 | fi | |
166 | @$(LEX) lexer.l | |
167 | @sed -e "s/lex.yy.c/lexer.l/g" < lex.yy.c | \ | |
168 | sed -e "s/yy/PROIO_yy/g" | \ | |
169 | sed -e "s/input/PROIO_input/g" | \ | |
170 | sed -e "s/unput/PROIO_unput/g" > lexer.c | |
171 | @$(RM) lex.yy.c | |
172 | @$(RM) lexer.l | |
173 | ||
174 | clean:: | |
a665764c | 175 |