]> git.saurik.com Git - wxWidgets.git/blame - src/make.env
Changes to allow Cygwin to compile in non-PCH mode
[wxWidgets.git] / src / make.env
CommitLineData
7f555861
JS
1# generic.env
2# Linux/generic
3#
4# Common makefile settings for wxWindows programs
5# This file is included by all the other makefiles, thus changes
6# made here take effect everywhere (except where overriden).
44c4a334 7# RCS-ID: $Id$
7f555861 8#
7f555861
JS
9########################### Programs #################################
10
11# Replace this with your own path if necessary
5dcf05ae 12WXDIR = $(WXWIN)
7f555861
JS
13
14# C++ compiler
15CC = g++
16
17# C compiler
18CCC = gcc
19
20# Compiler for lex/yacc .c programs
21CCLEX = $(CCC)
22
23LEX = lex
24YACC = yacc
25MAKE = make
26AROPTIONS = ruv
27RANLIB = ranlib
28
29############################ Switches #################################
30
31# Debug/trace mode. 1 or more for debugging.
b412f9be 32DEBUG = 1
7f555861
JS
33GUI = -D__WXSTUBS__ -D__LINUX__ -D__UNIX__
34GUISUFFIX = _stubs
35
36########################## Compiler flags #############################
37
38# Misc options
7fe7d506 39OPTIONS = -D__WXDEBUG__
7f555861 40COPTIONS =
b412f9be 41DEBUGFLAGS = -ggdb
7f555861
JS
42INCLUDE =
43WARN = -Wall -Wno-unused # -w
44CWARN = -Wall -Wno-unused # -w
45OPT = # -O2
46
47############################ Includes #################################
48
49# Compiler or system-specific include paths
50COMPPATHS =
51XINCLUDE = -I/usr/openwin/include -I/usr/include/X11 -I/usr/include/Xm \
52 -I/usr/include/X11/Xm -I/usr/include
53XLIB = -L/usr/local/X11/lib -L/usr/openwin/lib -L/usr/X11/lib -L/usr/X11R6/lib
54
55############################ Libraries ################################
56
57COMPLIBS = -lstdc++
a4294b78 58GUILDLIBS = -lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lXpm -lX11 -lm
7f555861
JS
59
60############################# Suffixes ################################
61
62# Change cpp to c if you want to use main.c instead of main.cpp.
63# Edit wx_setup.h accordingly (USE_C_MAIN=1)
64
65OBJSUFF =o
66SRCSUFF =cpp
67MAINSUFF =cpp
68
69####################### No changes below this line ####################
70
71WXINC = $(WXDIR)/include
72WXLIB = $(WXDIR)/lib/libwx$(GUISUFFIX).a
73INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(COMPPATHS)
74
75# Directory for object files
76OBJDIR = objects$(GUISUFFIX)
77
ea57084d
JS
78CPPFLAGS = $(EXTRACPPFLAGS) $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT)
79CFLAGS = $(EXTRACFLAGS) $(XINCLUDE) $(INC) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT)
7f555861
JS
80LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib
81LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS)
82
83# Clears all default suffixes
84.SUFFIXES: .o .cpp .c
85
86.c.o :
3dd4e4e0 87 $(CCC) -c $(CFLAGS) -o $@ $<
7f555861
JS
88
89.cpp.o :
90 $(CC) -c $(CPPFLAGS) -o $@ $<
91
8704bf74
JS
92.C.o :
93 $(CC) -c $(CPPFLAGS) -o $@ $<
94
7f555861
JS
95####################### Targets to allow multiple GUIs ####################
96
97dummy:
98 echo Use a target: one of motif, stubs
99
100stubs:
101 make -f makefile.unx all GUI='-D__WXSTUBS__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
102
103motif:
a4294b78 104 make -f makefile.unx all GUI='-D__WXMOTIF__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lXpm -lX11 -lm'
7f555861 105
f97c9854 106gtk:
8710cf5c 107 make -f makefile.unx all GUI='-D__WXGTK__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_gtk' GUILDLIBS='-lwx_gtk2 $(COMPLIBS) -ldl -lgtk -lgdk -lglib -lX11 -lm -pthread'
f97c9854 108
7f555861
JS
109cleanstubs:
110 make -f makefile.unx clean GUI='-D__WXSTUBS__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
111
112cleanmotif:
113 make -f makefile.unx clean GUI='-D__WXMOTIF__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
114
115$(OBJDIR):
116 mkdir $(OBJDIR)
117