compile db sample conditionally only if odbc support was built
[wxWidgets.git] / samples / db / makefile.gcc
1 # =========================================================================
2 #     This makefile was generated by
3 #     Bakefile 0.1.1 (http://bakefile.sourceforge.net)
4 #     Do not modify, all changes will be overwritten!
5 # =========================================================================
6
7 include ../../build/msw/config.gcc
8
9 # -------------------------------------------------------------------------
10 # Do not modify the rest of this file!
11 # -------------------------------------------------------------------------
12
13 ### Variables: ###
14
15 DBTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \
16         -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
17         $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(SETUPHDIR) -Wall -I. \
18         $(__DLLFLAG_p) -I.\..\..\samples $(CXXFLAGS) $(__EXCEPTIONSFLAG_4) \
19         $(__EXCEPTIONSFLAG_5)
20 DBTEST_OBJECTS =  \
21         $(OBJS)\dbtest_dbtest.o \
22         $(OBJS)\dbtest_listdb.o \
23         $(OBJS)\dbtest_dbtest_rc.o
24 OBJS = \
25         gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
26 SETUPHDIR = \
27         $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
28
29 ### Conditionally set variables: ###
30
31 ifeq ($(GCC_VERSION),2.95)
32 GCCFLAGS = -fvtable-thunks
33 endif
34 ifeq ($(SHARED),0)
35 LIBDIRNAME = .\..\..\lib\gcc_lib$(CFG)
36 endif
37 ifeq ($(SHARED),1)
38 LIBDIRNAME = .\..\..\lib\gcc_dll$(CFG)
39 endif
40 ifeq ($(USE_GUI),0)
41 PORTNAME = base
42 endif
43 ifeq ($(USE_GUI),1)
44 PORTNAME = msw
45 endif
46 ifeq ($(BUILD),debug)
47 ifeq ($(DEBUG_FLAG),default)
48 WXDEBUGFLAG = d
49 endif
50 endif
51 ifeq ($(DEBUG_FLAG),1)
52 WXDEBUGFLAG = d
53 endif
54 ifeq ($(SHARED),1)
55 WXDLLFLAG = dll
56 endif
57 ifeq ($(UNICODE),1)
58 WXUNICODEFLAG = u
59 endif
60 ifeq ($(WXUNIV),1)
61 WXUNIVNAME = univ
62 endif
63 ifeq ($(BUILD),debug)
64 ifeq ($(DEBUG_INFO),default)
65 __DEBUGINFO = -g
66 endif
67 endif
68 ifeq ($(BUILD),release)
69 ifeq ($(DEBUG_INFO),default)
70 __DEBUGINFO = 
71 endif
72 endif
73 ifeq ($(DEBUG_INFO),0)
74 __DEBUGINFO = 
75 endif
76 ifeq ($(DEBUG_INFO),1)
77 __DEBUGINFO = -g
78 endif
79 ifeq ($(BUILD),debug)
80 ifeq ($(DEBUG_FLAG),default)
81 __DEBUG_DEFINE_p = -D__WXDEBUG__
82 endif
83 endif
84 ifeq ($(DEBUG_FLAG),1)
85 __DEBUG_DEFINE_p = -D__WXDEBUG__
86 endif
87 ifeq ($(BUILD),debug)
88 ifeq ($(DEBUG_FLAG),default)
89 __DEBUG_DEFINE_p_1 = --define __WXDEBUG__
90 endif
91 endif
92 ifeq ($(DEBUG_FLAG),1)
93 __DEBUG_DEFINE_p_1 = --define __WXDEBUG__
94 endif
95 ifeq ($(SHARED),1)
96 __DLLFLAG_p = -DWXUSINGDLL
97 endif
98 ifeq ($(SHARED),1)
99 __DLLFLAG_p_1 = --define WXUSINGDLL
100 endif
101 ifeq ($(USE_EXCEPTIONS),0)
102 __EXCEPTIONSFLAG_4 = -fno-rtti
103 endif
104 ifeq ($(USE_EXCEPTIONS),1)
105 __EXCEPTIONSFLAG_4 = 
106 endif
107 ifeq ($(USE_EXCEPTIONS),0)
108 __EXCEPTIONSFLAG_5 = -fno-exceptions
109 endif
110 ifeq ($(USE_EXCEPTIONS),1)
111 __EXCEPTIONSFLAG_5 = 
112 endif
113 ifeq ($(USE_GUI),1)
114 __LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG)
115 endif
116 ifeq ($(USE_GUI),1)
117 __LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)
118 endif
119 ifeq ($(USE_GUI),1)
120 __LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG)
121 endif
122 ifeq ($(BUILD),debug)
123 __OPTIMIZEFLAG_2 = -O0
124 endif
125 ifeq ($(BUILD),release)
126 __OPTIMIZEFLAG_2 = -O2
127 endif
128 ifeq ($(UNICODE),1)
129 __UNICODE_DEFINE_p = -D_UNICODE
130 endif
131 ifeq ($(UNICODE),1)
132 __UNICODE_DEFINE_p_1 = --define _UNICODE
133 endif
134 ifeq ($(MSLU),1)
135 __UNICOWS_LIB_p = -lunicows
136 endif
137 ifeq ($(MONOLITHIC),0)
138 __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG)
139 endif
140 ifeq ($(MONOLITHIC),0)
141 __WXLIB_CORE_p = \
142         -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core
143 endif
144 ifeq ($(MONOLITHIC),1)
145 __WXLIB_MONO_p = \
146         -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)
147 endif
148 ifeq ($(MONOLITHIC),0)
149 __WXLIB_ODBC_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_odbc
150 endif
151 ifeq ($(WXUNIV),1)
152 __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
153 endif
154 ifeq ($(WXUNIV),1)
155 __WXUNIV_DEFINE_p_1 = --define __WXUNIVERSAL__
156 endif
157 ifeq ($(USE_ODBC),1)
158 __dbtest___depname = $(OBJS)\dbtest.exe
159 endif
160
161
162 all: $(OBJS)
163 $(OBJS):
164         -if not exist $(OBJS) mkdir $(OBJS)
165
166 ### Targets: ###
167
168 all: $(__dbtest___depname)
169
170 $(OBJS)\dbtest_dbtest.o: ./dbtest.cpp
171         $(CXX) -c -o $@ $(DBTEST_CXXFLAGS) $<
172
173 $(OBJS)\dbtest_dbtest_rc.o: ./dbtest.rc
174         windres --use-temp-file -i$< -o$@  --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(SETUPHDIR) --include-dir . $(__DLLFLAG_p_1) --include-dir ./../../samples
175
176 $(OBJS)\dbtest_listdb.o: ./listdb.cpp
177         $(CXX) -c -o $@ $(DBTEST_CXXFLAGS) $<
178
179 clean: 
180         -if exist $(OBJS)\*.o del $(OBJS)\*.o
181         -if exist $(OBJS)\dbtest.exe del $(OBJS)\dbtest.exe
182
183 ifeq ($(USE_ODBC),1)
184 $(OBJS)\dbtest.exe: $(DBTEST_OBJECTS) $(OBJS)\dbtest_dbtest_rc.o
185         $(CXX) -o $@ $(DBTEST_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows  $(__WXLIB_ODBC_p)  $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG)  -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG)  $(__UNICOWS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
186 endif
187
188 .PHONY: all clean