]> git.saurik.com Git - wxWidgets.git/blob - src/makeg95.env
gcc warning about printf() format mismatch corrected
[wxWidgets.git] / src / makeg95.env
1 # makeg95.env
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.
6 #
7
8 # If using Cygwin, set this to 0.
9 # If using Mingw32, set this to 1.
10 MINGW32=0
11
12 ########################## Compiler ##################################
13
14 # C++ compiler
15 # Put a comment before --pipe for Cygwin, remove comment for Mingw32 2.95
16
17 ifeq ($(MINGW32),1)
18 CC = gcc --pipe -fvtable-thunks
19 else
20 CC = gcc
21 endif
22
23 # C compiler for pure C programs
24 CCC = $(CC)
25
26 # Compiler used for LEX generated C
27 CCLEX=gcc
28
29 MAKE=make
30
31 # LEX
32 LEX=flex # -t -L
33
34 # YACC. yacc or bison
35 YACC=byacc
36 #YACC=bison
37
38 # Settings for Cyginw/Mingw32
39 RESCOMP=windres.exe
40 RCINPUTSWITCH=-i
41 RCOUTPUTSWITCH=-o
42 RCINCSWITCH=--include-dir
43 RCDEFSWITCH=--define
44
45 RESFLAGS=$(RCINCSWITCH) $(WXDIR)/include $(RCDEFSWITCH) __WIN32__ $(RCDEFSWITCH) __WIN95__ $(RCDEFSWITCH) __GNUWIN32__
46
47 ########################## Compiler flags #############################
48
49 # Miscellaneous compiler options
50 OPTIONS= -DSTRICT # -D__MINGW32__
51
52 # Debugging information
53 DEBUGFLAGS = -D__WXDEBUG__
54
55 WIN95=1
56
57 ifeq ($(WIN95),0)
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.
61 APPVER=3.50
62 WINVERSION=-DWINVER=0x0350 -D__GNUWIN32__ -D__WIN32__ # Generic WIN32
63 else
64 APPVER=3.50 # 4.0
65 # This means 'enable Windows 95 features' (in wxWindows and in VC++ 4.0).
66 WINVERSION=-DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__
67 endif
68
69 CPU=i386
70
71 # Suffixes
72 OBJSUFF=o
73 SRCSUFF=cpp
74 LIBPREFIX=lib
75 LIBSUFF=a
76 EXESUFF=.exe
77 RESSUFF=res
78 RSCSUFF=rsc
79
80 # Warnings
81 WARN = -Wall
82
83 # Which GUI, -Dwx_xview or -Dwx_motif (don't change this)
84 GUI = -D__WXMSW__ -D__WINDOWS__
85
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
92
93 # Options for ar archiver
94 # AROPTIONS = crs # For IRIX and Solaris (both SYSVR4).
95 AROPTIONS = ruv
96 RANLIB = ranlib
97
98 # Extra compiler libraries
99 COMPLIBS=
100
101 # Compiler or system-specific include paths
102 COMPPATHS=
103
104 ########################## Directories ###############################
105
106 WINLIBS=-lstdc++ -lgcc \
107 -lwinspool -lwinmm -lshell32 \
108 -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 \
109 -lole32 -loleaut32 -luuid \
110 -lodbc32 -lwsock32# -loldnames
111
112 #WINLIBS=-lstdc++ -lgcc \
113 # -lwinspool -lwinmm -lshell32 \
114 # -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lwsock32 # -loldnames
115
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)
121
122 ifeq ($(MINGW32),1)
123 INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/zlib $(EXTRAINC) $(COMPPATHS)
124 else
125 INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/zlib $(EXTRAINC) $(COMPPATHS) -I$(WXDIR)/include/wx/msw/gnuwin32
126 endif
127
128 RCLFLAGS=-cpp "cpp -lang-c++ -DWIN32 -D_WIN32 -DRCL_INVOKED -I$(WXWIN)/include"
129
130 LIBS = $(WXLIB) $(WINLIBS) $(COMPLIBS) $(EXTRALIBS)
131
132 WINFLAGS=-D_X86_=1 -DWIN32 -D_WIN32 $(WINVERSION)
133
134 #for windows 95
135 XINCLUDE=$(WINFLAGS)
136 XLIB=$(LIBS)
137 LDLIBS = $(LIBS)
138
139 # Directory for object files (don't change)
140 # OBJDIR = objects$(GUISUFFIX)
141 OBJDIR = .
142
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)
148
149 .SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .c
150
151 .$(SRCSUFF).$(OBJSUFF):
152 $(CC) -c $(CPPFLAGS) -o $@ $*.$(SRCSUFF)
153
154 .c.o:
155 $(CC) -c $(CPPFLAGS) -o $@ $*.c
156
157