2 # Common makefile settings for wxWindows programs
3 # This file is included by all the other makefiles, thus changes
4 # made here take effect everywhere (except where overriden).
5 # The settings are for GnuWin32-derived compilers, i.e. Cygwin and Mingw32.
8 # If using Cygwin, set this to 0.
9 # If using Mingw32, set this to 1.
12 # Set to the version you have
15 ########################## Compiler ##################################
18 # Put a comment before --pipe for Cygwin, remove comment for Mingw32 2.95
21 ifeq ($(MINGW32VERSION),2.95)
22 CC = gcc --pipe -fvtable-thunks
30 # C compiler for pure C programs
33 # Compiler used for LEX generated C
45 # Settings for Cyginw/Mingw32
49 RCINCSWITCH=--include-dir
52 RESFLAGS=$(RCINCSWITCH) $(WXDIR)/include $(RCDEFSWITCH) __WIN32__ $(RCDEFSWITCH) __WIN95__ $(RCDEFSWITCH) __GNUWIN32__
54 ########################## Compiler flags #############################
56 # Miscellaneous compiler options
57 OPTIONS= -DSTRICT # -D__MINGW32__
59 # Debugging information
60 DEBUGFLAGS = -D__WXDEBUG__
65 # With 3.50, Win95 will use your existing icons to show smaller ones.
66 # With 4.0, you'll have to follow Win95 procedures for icons or you'll get the
67 # default Windows icon.
69 WINVERSION=-DWINVER=0x0350 -D__GNUWIN32__ -D__WIN32__ # Generic WIN32
72 # This means 'enable Windows 95 features' (in wxWindows and in VC++ 4.0).
73 WINVERSION=-DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__
90 # Which GUI, -Dwx_xview or -Dwx_motif (don't change this)
91 GUI = -D__WXMSW__ -D__WINDOWS__
93 # according to Guillermo Rodriguez Garcia <guille@iies.es> this flag is
94 # needed to make the standard div() function work - otherwise it returns
95 # absolutely incorrect results and completely breaks the wxImage class
96 # (where it's used extensively)
97 # GRG: at least it is needed in mingw32-gcc2.8.1
98 OPT = -fno-pcc-struct-return -O2 -fno-rtti -fno-exceptions
100 # Options for ar archiver
101 # AROPTIONS = crs # For IRIX and Solaris (both SYSVR4).
105 # Extra compiler libraries
108 # Compiler or system-specific include paths
111 ########################## Directories ###############################
113 WINLIBS=-lstdc++ -lgcc \
114 -lwinspool -lwinmm -lshell32 \
115 -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 \
116 -lole32 -loleaut32 -luuid \
117 -lodbc32 -lwsock32# -loldnames
119 #WINLIBS=-lstdc++ -lgcc \
120 # -lwinspool -lwinmm -lshell32 \
121 # -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lwsock32 # -loldnames
123 # Shouldn't need to change these...
124 WXSRC=$(WXDIR)/src/msw
125 WXINC=$(WXDIR)/include
126 WXBASESRC=$(WXDIR)/src/common
127 WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx.$(LIBSUFF)
129 GNUWIN32EXTRA=-I$(WXDIR)/include/wx/msw/gnuwin32
132 ifeq ($(MINGW32),2.95)
138 INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/zlib $(EXTRAINC) $(COMPPATHS)
140 INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/zlib $(EXTRAINC) $(COMPPATHS) -I$(WXDIR)/include/wx/msw/gnuwin32
143 RCLFLAGS=-cpp "cpp -lang-c++ -DWIN32 -D_WIN32 -DRCL_INVOKED -I$(WXWIN)/include"
145 LIBS = $(WXLIB) $(WINLIBS) $(COMPLIBS) $(EXTRALIBS)
147 WINFLAGS=-D_X86_=1 -DWIN32 -D_WIN32 $(WINVERSION)
154 # Directory for object files (don't change)
155 # OBJDIR = objects$(GUISUFFIX)
158 # You shouldn't need to change these...
159 CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACPPFLAGS)
160 CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACFLAGS)
161 WINDOWSLDFLAGS=-Wl,--subsystem,windows -mwindows
162 LDFLAGS = $(WINDOWSLDFLAGS) -L$(WXDIR)/lib $(EXTRALDFLAGS)
164 .SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .c
166 .$(SRCSUFF).$(OBJSUFF):
167 $(CC) -c $(CPPFLAGS) -o $@ $*.$(SRCSUFF)
170 $(CC) -c $(CPPFLAGS) -o $@ $*.c