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