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 ########################## Compiler ##################################
15 # Put a comment before --pipe for Cygwin, remove comment for Mingw32 2.95
18 CC = gcc --pipe -fvtable-thunks
23 # C compiler for pure C programs
26 # Compiler used for LEX generated C
38 # Settings for Cyginw/Mingw32
42 RCINCSWITCH=--include-dir
45 RESFLAGS=$(RCINCSWITCH) $(WXDIR)/include $(RCDEFSWITCH) __WIN32__ $(RCDEFSWITCH) __WIN95__ $(RCDEFSWITCH) __GNUWIN32__
47 ########################## Compiler flags #############################
49 # Miscellaneous compiler options
50 OPTIONS= -DSTRICT # -D__MINGW32__
52 # Debugging information
53 DEBUGFLAGS = -D__WXDEBUG__
58 # With 3.50, Win95 will use your existing icons to show smaller ones.
59 # With 4.0, you'll have to follow Win95 procedures for icons or you'll get the
60 # default Windows icon.
62 WINVERSION=-DWINVER=0x0350 -D__GNUWIN32__ -D__WIN32__ # Generic WIN32
65 # This means 'enable Windows 95 features' (in wxWindows and in VC++ 4.0).
66 WINVERSION=-DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__
83 # Which GUI, -Dwx_xview or -Dwx_motif (don't change this)
84 GUI = -D__WXMSW__ -D__WINDOWS__
86 # according to Guillermo Rodriguez Garcia <guille@iies.es> this flag is
87 # needed to make the standard div() function work - otherwise it returns
88 # absolutely incorrect results and completely breaks the wxImage class
89 # (where it's used extensively)
90 # GRG: at least it is needed in mingw32-gcc2.8.1
91 OPT = -fno-pcc-struct-return -O2 -fno-rtti -fno-exceptions
93 # Options for ar archiver
94 # AROPTIONS = crs # For IRIX and Solaris (both SYSVR4).
98 # Extra compiler libraries
101 # Compiler or system-specific include paths
104 ########################## Directories ###############################
106 WINLIBS=-lstdc++ -lgcc \
107 -lwinspool -lwinmm -lshell32 \
108 -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 \
109 -lole32 -loleaut32 -luuid \
110 -lodbc32 -lwsock32# -loldnames
112 #WINLIBS=-lstdc++ -lgcc \
113 # -lwinspool -lwinmm -lshell32 \
114 # -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lwsock32 # -loldnames
116 # Shouldn't need to change these...
117 WXSRC=$(WXDIR)/src/msw
118 WXINC=$(WXDIR)/include
119 WXBASESRC=$(WXDIR)/src/common
120 WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx.$(LIBSUFF)
123 INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/zlib $(EXTRAINC) $(COMPPATHS)
125 INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/zlib $(EXTRAINC) $(COMPPATHS) -I$(WXDIR)/include/wx/msw/gnuwin32
128 RCLFLAGS=-cpp "cpp -lang-c++ -DWIN32 -D_WIN32 -DRCL_INVOKED -I$(WXWIN)/include"
130 LIBS = $(WXLIB) $(WINLIBS) $(COMPLIBS) $(EXTRALIBS)
132 WINFLAGS=-D_X86_=1 -DWIN32 -D_WIN32 $(WINVERSION)
139 # Directory for object files (don't change)
140 # OBJDIR = objects$(GUISUFFIX)
143 # You shouldn't need to change these...
144 CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACPPFLAGS)
145 CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACFLAGS)
146 WINDOWSLDFLAGS=-Wl,--subsystem,windows -mwindows
147 LDFLAGS = $(WINDOWSLDFLAGS) -L$(WXDIR)/lib $(EXTRALDFLAGS)
149 .SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .c
151 .$(SRCSUFF).$(OBJSUFF):
152 $(CC) -c $(CPPFLAGS) -o $@ $*.$(SRCSUFF)
155 $(CC) -c $(CPPFLAGS) -o $@ $*.c