]> git.saurik.com Git - wxWidgets.git/blob - src/makeenvs/linux.env
latest CW additions
[wxWidgets.git] / src / makeenvs / linux.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 # RCS-ID: $Id$
8 #
9 ########################### Programs #################################
10
11 # Replace this with your own path if necessary
12 WXDIR = $(WXWIN)
13
14 # C++ compiler
15 CC = g++
16
17 # C compiler
18 CCC = gcc
19
20 # Compiler for lex/yacc .c programs
21 CCLEX = $(CCC)
22
23 LEX = lex
24 YACC = yacc
25 MAKE = make
26 AROPTIONS = ruv
27 RANLIB = ranlib
28
29 ############################ Switches #################################
30
31 # Debug/trace mode. 1 or more for debugging.
32 DEBUG = 0
33 GUI = -D__WXSTUBS__ -D__LINUX__ -D__UNIX__
34 GUISUFFIX = _stubs
35
36 ########################## Compiler flags #############################
37
38 # Misc options
39 OPTIONS = -D__WXDEBUG__
40 COPTIONS =
41 DEBUGFLAGS = -ggdb
42 INCLUDE =
43 WARN = -Wall -Wno-unused # -w
44 CWARN = -Wall -Wno-unused # -w
45 OPT = # -O2
46
47 ############################ Includes #################################
48
49 # Compiler or system-specific include paths
50 COMPPATHS =
51 XINCLUDE = -I/usr/openwin/include -I/usr/include/X11 -I/usr/include/Xm \
52 -I/usr/include/X11/Xm -I/usr/include
53 XLIB = -L/usr/local/X11/lib -L/usr/openwin/lib -L/usr/X11/lib -L/usr/X11R6/lib
54
55 ############################ Libraries ################################
56
57 COMPLIBS = -lstdc++
58 GUILDLIBS = -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
65 OBJSUFF =o
66 SRCSUFF =cpp
67 MAINSUFF =cpp
68
69 ####################### No changes below this line ####################
70
71 WXINC = $(WXDIR)/include
72 WXLIB = $(WXDIR)/lib/libwx$(GUISUFFIX).a
73 INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(COMPPATHS)
74
75 # Directory for object files
76 OBJDIR = objects$(GUISUFFIX)
77
78 CPPFLAGS = $(EXTRACPPFLAGS) $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT)
79 CFLAGS = $(EXTRACFLAGS) $(XINCLUDE) $(INC) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT)
80 LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib
81 LDLIBS = $(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
97 dummy:
98 echo Use a target: one of motif, stubs
99
100 stubs:
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
103 motif:
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'
105
106 gtk:
107 make -f makefile.unx all GUI='-D__WXGTK__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_gtk' GUILDLIBS='-lwx_gtk $(COMPLIBS) -lXm -lXmu -lXpm -lX11 -lm'
108
109 cleanstubs:
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
112 cleanmotif:
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