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).
6 # An alternative to editing this file is to create a shell script
7 # to export specific variables, and call make with the -e switch
8 # to override makefile variables. See wx/install/install.txt.
9 # And you can override specific variables on the make command line, e.g.
11 # make -f makefile.unix WXDEBUG=''
13 # You may prefer to use the GNU configure script than raw makefiles -
14 # see contrib/wxshlib.
17 ########################## Compiler ##################################
20 # For AIX/CSet++: use CC = xlC
21 # For IRIX: use CC = CC
25 # C compiler for pure C programs
26 # Typical: CC=g++ , CCC=gcc
27 # CC=cl386 /Tp, CCC=cl386
29 # (Used only for XView, file sb_scrol.c)
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= -D__EGCS__ # -D__MINGW32__
59 # Debugging information
62 DEBUGFLAGS = -ggdb -D__WXDEBUG__
67 # With 3.50, Win95 will use your existing icons to show smaller ones.
68 # With 4.0, you'll have to follow Win95 procedures for icons or you'll get the
69 # default Windows icon.
71 WINVERSION=-DWINVER=0x0350 -D__GNUWIN32__ -D__WIN32__ # Generic WIN32
74 # This means 'enable Windows 95 features' (in wxWindows and in VC++ 4.0).
75 WINVERSION=-DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__
92 # Which GUI, -Dwx_xview or -Dwx_motif (don't change this)
93 GUI = -D__WXMSW__ -D__WINDOWS__
98 # according to Guillermo Rodriguez Garcia <guille@iies.es> this flag is needed
99 # to make the standard div() functio work - otherwise it returns absolutely
100 # incorrect results and completely breaks the wxImage class (where it's used
102 OPT = -fno-pcc-struct-return
104 # Options for ar archiver
105 # AROPTIONS = crs # For IRIX and Solaris (both SYSVR4).
109 # Compiler libraries: defaults to GCC libraries
114 # Compiler or system-specific include paths
117 ########################## Directories ###############################
120 WINLIBS=-lstdc++ -lgcc \
121 -lwinspool -lwinmm -lshell32 \
122 -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 # -loldnames
124 # Shouldn't need to change these...
125 WXSRC=$(WXDIR)/src/msw
126 WXINC=$(WXDIR)/include
127 WXBASESRC=$(WXDIR)/src/common
128 WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx.$(LIBSUFF)
129 INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/jpeg -I$(WXDIR)/include/wx/msw/gnuwin32 -I$(WXDIR)/src/zlib $(EXTRAINC) $(COMPPATHS)
130 RCLFLAGS=-cpp "cpp -lang-c++ -DWIN32 -D_WIN32 -DRCL_INVOKED -I$(WXWIN)\include"
132 #LIBS = -lctl3d32 $(WXLIB) $(WINLIBS) $(COMPLIBS)
133 LIBS = $(WXLIB) $(WINLIBS) $(COMPLIBS) $(EXTRALIBS)
135 WINFLAGS=-D_X86_=1 -DWIN32 -D_WIN32 $(WINVERSION)
142 # Directory for object files (don't change)
143 # OBJDIR = objects$(GUISUFFIX)
145 # You shouldn't need to change these...
146 CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACPPFLAGS)
147 CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACFLAGS)
148 WINDOWSLDFLAGS=-Wl,--subsystem,windows -mwindows
149 LDFLAGS = $(WINDOWSLDFLAGS) -L$(WXDIR)/lib $(EXTRALDFLAGS)
151 .SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .c
153 # Set these in a batch file instead e.g. install/cygnus.bat
154 # RCINCLUDE="$(WXDIR)/include/msw;$(WXDIR)/contrib/fafa;$(WXDIR)/contrib/itsybits"; \
155 # CPLUS_INCLUDE_PATH=/usr/H-i386-cygwin32/i386-cygwin32/include:/usr/H-i386-cygwin32/lib/gcc-lib/i386-cygwin32/cygnus-2.7.2-961023/include:$(WXDIR)/include/common:$(WXDIR)/include/msw:$(WXDIR)/contrib/fafa:$(WXDIR)/contrib/itsybits; \
156 # export CPLUS_INCLUDE_PATH RCINCLUDE; \
158 #.rc.$(RESSUFF): $< $(WXDIR)/include/msw/wx.rc
159 # $(RC) $(RESFLAGS1) $< $(RESFLAGS2) $*.$(RESSUFF) $(RCLFLAGS)
161 #.$(RESSUFF).$(RSCSUFF): $<
162 # $(CVTRES) $< $*.$(RSCSUFF)
164 .$(SRCSUFF).$(OBJSUFF):
165 $(CC) -c $(CPPFLAGS) -o $@ $*.$(SRCSUFF)
168 $(CC) -c $(CPPFLAGS) -o $@ $*.c