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
51 RESFLAGS=$(RCINCSWITCH) $(WXDIR)/include $(RCDEFSWITCH) __WIN32__ $(RCDEFSWITCH) __WIN95__ $(RCDEFSWITCH) __GNUWIN32__
53 ########################## Compiler flags #############################
55 # Miscellaneous compiler options
56 OPTIONS= # -D__MINGW32__ # -D__EGCS__
58 # Debugging information
61 DEBUGFLAGS = -ggdb -D__WXDEBUG__
66 # With 3.50, Win95 will use your existing icons to show smaller ones.
67 # With 4.0, you'll have to follow Win95 procedures for icons or you'll get the
68 # default Windows icon.
70 WINVERSION=-DWINVER=0x0350 -D__GNUWIN32__ -D__WIN32__ # Generic WIN32
73 # This means 'enable Windows 95 features' (in wxWindows and in VC++ 4.0).
74 WINVERSION=-DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__
91 # Which GUI, -Dwx_xview or -Dwx_motif (don't change this)
92 GUI = -D__WXMSW__ -D__WINDOWS__
98 # Options for ar archiver
99 # AROPTIONS = crs # For IRIX and Solaris (both SYSVR4).
103 # Compiler libraries: defaults to GCC libraries
108 # Compiler or system-specific include paths
109 COMPPATHS=-I$(TWINDIR)/include
111 ########################## Directories ###############################
114 WINLIBS=-lstdc++ -lgcc -lm -ldl -ltwin32 -lcomctl32 -lcommdlg -lddeml -lmmsystem -lshell -lXpm -lX11 -lm
116 # -lwinspool -lwinmm -lshell32 -loldnames \
117 # -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32
119 # Shouldn't need to change these...
120 WXSRC=$(WXDIR)/src/msw
121 WXINC=$(WXDIR)/include
122 WXBASESRC=$(WXDIR)/src/common
123 WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx.$(LIBSUFF)
124 INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/include/wx/msw/gnuwin32 -I$(WXDIR)/src/zlib $(EXTRAINC)$(COMPPATHS)
125 RCLFLAGS=-cpp "cpp -lang-c++ -DWIN32 -D_WIN32 -DRCL_INVOKED -I$(WXWIN)\include"
127 #LIBS = -lctl3d32 $(WXLIB) $(WINLIBS) $(COMPLIBS)
128 LIBS = $(WXLIB) $(WINLIBS) $(COMPLIBS)
130 WINFLAGS=-DX386 -DWIN32 -D_WIN32 $(WINVERSION) -DTWIN32 -D__TWIN32__
137 # Directory for object files (don't change)
138 OBJDIR = objects$(GUISUFFIX)
140 # You shouldn't need to change these...
141 CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT)
142 CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT)
144 LDFLAGS = $(WINDOWSLDFLAGS) -L$(WXDIR)/lib -L/usr/X11R6/lib -L$(TWINDIR)/win
146 .SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .c
148 .rc.$(RESSUFF): $< $(WXDIR)/include/msw/wx.rc
149 $(RC) $(RESFLAGS1) $< $(RESFLAGS2) $*.$(RESSUFF) $(RCLFLAGS)
151 .$(RESSUFF).$(RSCSUFF): $<
152 $(CVTRES) $< $*.$(RSCSUFF)
154 .$(SRCSUFF).$(OBJSUFF):
155 $(CC) -c $(CPPFLAGS) -o $@ $*.$(SRCSUFF)
158 $(CC) -c $(CPPFLAGS) -o $@ $*.c