]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/make.env
Trying to repair what CVS can do to source code
[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
25MAKE = make
26AROPTIONS = ruv
27RANLIB = ranlib
28
29############################ Switches #################################
30
31# Debug/trace mode. 1 or more for debugging.
32DEBUG = 1
33GUI = -D__WXSTUBS__ -D__LINUX__ -D__UNIX__
34GUISUFFIX = _stubs
35
36########################## Compiler flags #############################
37
38# Misc options
39OPTIONS = -D__WXDEBUG__
40COPTIONS =
41DEBUGFLAGS = -ggdb
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++
58GUILDLIBS = -lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lXpm -lX11 -lm
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
78CPPFLAGS = $(EXTRACPPFLAGS) $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT)
79CFLAGS = $(EXTRACFLAGS) $(XINCLUDE) $(INC) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT)
80LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib
81LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS)
82
83# Clears all default suffixes
84.SUFFIXES: .o .cpp .c
85
86.c.o :
87 $(CCC) -c $(CFLAGS) -o $@ $<
88
89.cpp.o :
90 $(CC) -c $(CPPFLAGS) -o $@ $<
91
92.C.o :
93 $(CC) -c $(CPPFLAGS) -o $@ $<
94
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:
104 make -f makefile.unx all GUI='-D__WXMOTIF__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lpng -lzlib -lXm -lXmu -lXt -lXpm -lX11 -lm'
105
106gtk:
107 make -f makefile.unx all GUI='-D__WXGTK__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_gtk' GUILDLIBS='-lwx_gtk2 $(COMPLIBS) -ldl -lgtk -lgdk -lglib -lpng -lzlib -lX11 -lm -pthread'
108
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