]> git.saurik.com Git - wxWidgets.git/blob - src/make.env
changed wxMatchWild() 3rd parameter not used under Unix - what is it good for?
[wxWidgets.git] / src / make.env
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 #
8 # An alternative to editing this file is to create a shell script
9 # to export specific variables, and call make with the -e switch
10 # to override makefile variables. See wx/install/install.txt.
11 # And you can override specific variables on the make command line, e.g.
12 #
13 # make -f makefile.unix DEBUG=''
14 #
15 # You may prefer to use the GNU configure script than raw makefiles -
16 # see contrib/wxshlib.
17 #
18
19 ########################### Programs #################################
20
21 # Replace this with your own path if necessary
22 WXDIR = /home/jacs/wx2
23
24 # C++ compiler
25 CC = g++
26
27 # C compiler
28 CCC = gcc
29
30 # Compiler for lex/yacc .c programs
31 CCLEX = $(CCC)
32
33 LEX = lex
34 YACC = yacc
35 MAKE = make
36 AROPTIONS = ruv
37 RANLIB = ranlib
38
39 ############################ Switches #################################
40
41 # Debug/trace mode. 1 or more for debugging.
42 DEBUG = 0
43 GUI = -D__WXSTUBS__ -D__LINUX__ -D__UNIX__
44 GUISUFFIX = _stubs
45
46 ########################## Compiler flags #############################
47
48 # Misc options
49 OPTIONS = -D__WXDEBUG__ -DWXDEBUG
50 COPTIONS =
51 DEBUGFLAGS = -ggdb
52 INCLUDE =
53 WARN = -Wall -Wno-unused # -w
54 CWARN = -Wall -Wno-unused # -w
55 OPT = # -O2
56
57 ############################ Includes #################################
58
59 # Compiler or system-specific include paths
60 COMPPATHS =
61 XINCLUDE = -I/usr/openwin/include -I/usr/include/X11 -I/usr/include/Xm \
62 -I/usr/include/X11/Xm -I/usr/include
63 XLIB = -L/usr/local/X11/lib -L/usr/openwin/lib -L/usr/X11/lib -L/usr/X11R6/lib
64
65 ############################ Libraries ################################
66
67 COMPLIBS = -lstdc++
68 GUILDLIBS = -lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm
69
70 ############################# Suffixes ################################
71
72 # Change cpp to c if you want to use main.c instead of main.cpp.
73 # Edit wx_setup.h accordingly (USE_C_MAIN=1)
74
75 OBJSUFF =o
76 SRCSUFF =cpp
77 MAINSUFF =cpp
78
79 ####################### No changes below this line ####################
80
81 WXINC = $(WXDIR)/include
82 WXLIB = $(WXDIR)/lib/libwx$(GUISUFFIX).a
83 INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(COMPPATHS)
84
85 # Directory for object files
86 OBJDIR = objects$(GUISUFFIX)
87
88 CPPFLAGS = $(EXTRACPPFLAGS) $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(WARN) $(OPT)
89 CFLAGS = $(EXTRACFLAGS) $(XINCLUDE) $(INC) $(COPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(CWARN) $(OPT)
90 LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib
91 LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS)
92
93 # Clears all default suffixes
94 .SUFFIXES: .o .cpp .c
95
96 .c.o :
97 $(CC) -c $(CFLAGS) -o $@ $<
98
99 .cpp.o :
100 $(CC) -c $(CPPFLAGS) -o $@ $<
101
102 ####################### Targets to allow multiple GUIs ####################
103
104 dummy:
105 echo Use a target: one of motif, stubs
106
107 stubs:
108 make -f makefile.unx all GUI='-D__WXSTUBS__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
109
110 motif:
111 make -f makefile.unx all GUI='-D__WXMOTIF__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
112
113 cleanstubs:
114 make -f makefile.unx clean GUI='-D__WXSTUBS__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
115
116 cleanmotif:
117 make -f makefile.unx clean GUI='-D__WXMOTIF__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
118
119 $(OBJDIR):
120 mkdir $(OBJDIR)
121