]>
Commit | Line | Data |
---|---|---|
2bda0e17 KB |
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). | |
f3ef286f | 5 | # The settings are for GnuWin32-derived compilers, i.e. Cygwin and Mingw32. |
2bda0e17 | 6 | # |
f3ef286f JS |
7 | |
8 | # If using Cygwin, set this to 0. | |
9 | # If using Mingw32, set this to 1. | |
10 | MINGW32=0 | |
2bda0e17 KB |
11 | |
12 | ########################## Compiler ################################## | |
13 | ||
14 | # C++ compiler | |
f3ef286f JS |
15 | # Put a comment before --pipe for Cygwin, remove comment for Mingw32 2.95 |
16 | ||
17 | ifeq ($(MINGW32),1) | |
b4fe5125 | 18 | CC = gcc --pipe -fvtable-thunks |
f3ef286f JS |
19 | else |
20 | CC = gcc | |
21 | endif | |
2bda0e17 KB |
22 | |
23 | # C compiler for pure C programs | |
2bda0e17 KB |
24 | CCC = $(CC) |
25 | ||
26 | # Compiler used for LEX generated C | |
8704bf74 | 27 | CCLEX=gcc |
2bda0e17 KB |
28 | |
29 | MAKE=make | |
30 | ||
31 | # LEX | |
8870c26e | 32 | LEX=flex # -t -L |
2bda0e17 | 33 | |
57c208c5 | 34 | # YACC. yacc or bison |
2662e49e RR |
35 | YACC=byacc |
36 | #YACC=bison | |
2bda0e17 | 37 | |
57c208c5 | 38 | # Settings for Cyginw/Mingw32 |
2bda0e17 | 39 | RESCOMP=windres.exe |
57c208c5 JS |
40 | RCINPUTSWITCH=-i |
41 | RCOUTPUTSWITCH=-o | |
42 | RCINCSWITCH=--include-dir | |
43 | RCDEFSWITCH=--define | |
2bda0e17 | 44 | |
6a570331 | 45 | RESFLAGS=$(RCINCSWITCH) $(WXDIR)/include $(RCDEFSWITCH) __WIN32__ $(RCDEFSWITCH) __WIN95__ $(RCDEFSWITCH) __GNUWIN32__ |
2bda0e17 KB |
46 | |
47 | ########################## Compiler flags ############################# | |
48 | ||
49 | # Miscellaneous compiler options | |
f3ef286f | 50 | OPTIONS= -DSTRICT # -D__MINGW32__ |
2bda0e17 KB |
51 | |
52 | # Debugging information | |
e4d18e7f | 53 | DEBUGFLAGS = -D__WXDEBUG__ |
2bda0e17 | 54 | |
2bda0e17 KB |
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 | |
2bda0e17 KB |
81 | WARN = -Wall |
82 | ||
2bda0e17 | 83 | # Which GUI, -Dwx_xview or -Dwx_motif (don't change this) |
34138703 | 84 | GUI = -D__WXMSW__ -D__WINDOWS__ |
2bda0e17 | 85 | |
881eba2c GRG |
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 | |
e4d18e7f | 91 | OPT = -fno-pcc-struct-return -O2 -fno-rtti -fno-exceptions |
2bda0e17 KB |
92 | |
93 | # Options for ar archiver | |
94 | # AROPTIONS = crs # For IRIX and Solaris (both SYSVR4). | |
95 | AROPTIONS = ruv | |
96 | RANLIB = ranlib | |
2bda0e17 | 97 | |
b4fe5125 JS |
98 | # Extra compiler libraries |
99 | COMPLIBS= | |
2bda0e17 KB |
100 | |
101 | # Compiler or system-specific include paths | |
48d1144b | 102 | COMPPATHS= |
2bda0e17 | 103 | |
2bda0e17 KB |
104 | ########################## Directories ############################### |
105 | ||
2bda0e17 | 106 | WINLIBS=-lstdc++ -lgcc \ |
8870c26e | 107 | -lwinspool -lwinmm -lshell32 \ |
b4fe5125 JS |
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 | |
2bda0e17 KB |
115 | |
116 | # Shouldn't need to change these... | |
6a570331 RR |
117 | WXSRC=$(WXDIR)/src/msw |
118 | WXINC=$(WXDIR)/include | |
119 | WXBASESRC=$(WXDIR)/src/common | |
120 | WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx.$(LIBSUFF) | |
f3ef286f JS |
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 | ||
6a570331 | 128 | RCLFLAGS=-cpp "cpp -lang-c++ -DWIN32 -D_WIN32 -DRCL_INVOKED -I$(WXWIN)/include" |
2bda0e17 | 129 | |
dbda9e86 | 130 | LIBS = $(WXLIB) $(WINLIBS) $(COMPLIBS) $(EXTRALIBS) |
2bda0e17 KB |
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) | |
dbda9e86 | 140 | # OBJDIR = objects$(GUISUFFIX) |
881eba2c | 141 | OBJDIR = . |
2bda0e17 KB |
142 | |
143 | # You shouldn't need to change these... | |
dbda9e86 JS |
144 | CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACPPFLAGS) |
145 | CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACFLAGS) | |
57c208c5 | 146 | WINDOWSLDFLAGS=-Wl,--subsystem,windows -mwindows |
dbda9e86 | 147 | LDFLAGS = $(WINDOWSLDFLAGS) -L$(WXDIR)/lib $(EXTRALDFLAGS) |
2bda0e17 | 148 | |
2bda0e17 KB |
149 | .SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .c |
150 | ||
2bda0e17 KB |
151 | .$(SRCSUFF).$(OBJSUFF): |
152 | $(CC) -c $(CPPFLAGS) -o $@ $*.$(SRCSUFF) | |
153 | ||
154 | .c.o: | |
155 | $(CC) -c $(CPPFLAGS) -o $@ $*.c | |
156 | ||
157 |