]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/make.env
1. compilation fix for wxHelpHtmlController (which shouldn't be compiled #if
[wxWidgets.git] / src / make.env
... / ...
CommitLineData
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).
7# RCS-ID: $Id$
8#
9########################### Programs #################################
10
11# Replace this with your own path if necessary
12WXDIR = $(WXWIN)
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
25# Note: if using bison, use -y option for yacc compatibility
26# YACC = bison -y
27MAKE = make
28AROPTIONS = ruv
29RANLIB = ranlib
30
31############################ Switches #################################
32
33# Debug/trace mode. 1 or more for debugging.
34DEBUG = 1
35GUI = -D__WXSTUBS__ -D__UNIX__
36GUISUFFIX = _stubs
37
38########################## Compiler flags #############################
39
40# Misc options
41OPTIONS = -D__LINUX__ -D__WXDEBUG__
42COPTIONS =
43DEBUGFLAGS = # -ggdb
44INCLUDE =
45WARN = -Wall -Wno-unused # -w
46CWARN = -Wall -Wno-unused # -w
47OPT = -O2
48
49############################ Includes #################################
50
51# Compiler or system-specific include paths
52COMPPATHS =
53XINCLUDE = -I/usr/openwin/include -I/usr/include/X11 -I/usr/include/Xm \
54 -I/usr/include/X11/Xm -I/usr/include -I/usr/local/include \
55 -I/usr/lib/glib/include -I/usr/local/lib/glib/include
56XLIB = -L/usr/local/X11/lib -L/usr/openwin/lib -L/usr/X11/lib -L/usr/X11R6/lib
57
58############################ Libraries ################################
59
60COMPLIBS = -lstdc++
61GUILDLIBS = -lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lXpm -lX11 -lm
62
63############################# Suffixes ################################
64
65# Change cpp to c if you want to use main.c instead of main.cpp.
66# Edit wx_setup.h accordingly (USE_C_MAIN=1)
67
68OBJSUFF =o
69SRCSUFF =cpp
70MAINSUFF =cpp
71
72####################### No changes below this line ####################
73
74WXINC = $(WXDIR)/include
75WXLIB = $(WXDIR)/lib/libwx$(GUISUFFIX).a
76INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/zlib $(COMPPATHS)
77
78# Directory for object files
79OBJDIR = objects$(GUISUFFIX)
80
81CPPFLAGS = $(EXTRACPPFLAGS) $(INC) $(XINCLUDE) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT)
82CFLAGS = $(EXTRACFLAGS) $(INC) $(XINCLUDE) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT)
83LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib
84LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS)
85
86# Clears all default suffixes
87.SUFFIXES: .o .cpp .c
88
89.c.o :
90 $(CCC) -c $(CFLAGS) -o $@ $<
91
92.cpp.o :
93 $(CC) -c $(CPPFLAGS) -o $@ $<
94
95.C.o :
96 $(CC) -c $(CPPFLAGS) -o $@ $<
97
98####################### Targets to allow multiple GUIs ####################
99
100dummy:
101 echo Use a target: one of motif, stubs
102
103stubs:
104 make -f makefile.unx all GUI='-D__WXSTUBS__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
105
106motif:
107 make -f makefile.unx all GUI='-D__WXMOTIF__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lpng -lzlib -lXm -lXmu -lXt -lXpm -lX11 -lm'
108
109gtk:
110 make -f makefile.unx all GUI='-D__WXGTK__ -D__UNIX__' GUISUFFIX='_gtk' GUILDLIBS='-lwx_gtk $(COMPLIBS) -ldl `gtk-config --libs` -lX11 -lm -pthread'
111
112cleanstubs:
113 make -f makefile.unx clean GUI='-D__WXSTUBS__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
114
115cleanmotif:
116 make -f makefile.unx clean GUI='-D__WXMOTIF__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
117
118cleangtk:
119 make -f makefile.unx clean GUI='-D__WXGTK__ -D__UNIX__' GUISUFFIX='_gtk'
120
121$(OBJDIR):
122 mkdir $(OBJDIR)
123