]> git.saurik.com Git - wxWidgets.git/blame - src/make.env
Had missed one LPSTR.
[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
777553d2
JS
25# Note: if using bison, use -y option for yacc compatibility
26# YACC = bison -y
7f555861
JS
27MAKE = make
28AROPTIONS = ruv
29RANLIB = ranlib
30
31############################ Switches #################################
32
33# Debug/trace mode. 1 or more for debugging.
b412f9be 34DEBUG = 1
acbd13a3 35GUI = -D__WXSTUBS__ -D__UNIX__
7f555861
JS
36GUISUFFIX = _stubs
37
38########################## Compiler flags #############################
39
40# Misc options
acbd13a3 41OPTIONS = -D__LINUX__ -D__WXDEBUG__
7f555861 42COPTIONS =
b412f9be 43DEBUGFLAGS = -ggdb
7f555861
JS
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
55XLIB = -L/usr/local/X11/lib -L/usr/openwin/lib -L/usr/X11/lib -L/usr/X11R6/lib
56
57############################ Libraries ################################
58
59COMPLIBS = -lstdc++
a4294b78 60GUILDLIBS = -lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lXpm -lX11 -lm
7f555861
JS
61
62############################# Suffixes ################################
63
64# Change cpp to c if you want to use main.c instead of main.cpp.
65# Edit wx_setup.h accordingly (USE_C_MAIN=1)
66
67OBJSUFF =o
68SRCSUFF =cpp
69MAINSUFF =cpp
70
71####################### No changes below this line ####################
72
73WXINC = $(WXDIR)/include
74WXLIB = $(WXDIR)/lib/libwx$(GUISUFFIX).a
75INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(COMPPATHS)
76
77# Directory for object files
78OBJDIR = objects$(GUISUFFIX)
79
75737d05
JS
80CPPFLAGS = $(EXTRACPPFLAGS) $(INC) $(XINCLUDE) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT)
81CFLAGS = $(EXTRACFLAGS) $(INC) $(XINCLUDE) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT)
7f555861
JS
82LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib
83LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS)
84
85# Clears all default suffixes
86.SUFFIXES: .o .cpp .c
87
88.c.o :
3dd4e4e0 89 $(CCC) -c $(CFLAGS) -o $@ $<
7f555861
JS
90
91.cpp.o :
92 $(CC) -c $(CPPFLAGS) -o $@ $<
93
8704bf74
JS
94.C.o :
95 $(CC) -c $(CPPFLAGS) -o $@ $<
96
7f555861
JS
97####################### Targets to allow multiple GUIs ####################
98
99dummy:
100 echo Use a target: one of motif, stubs
101
102stubs:
acbd13a3 103 make -f makefile.unx all GUI='-D__WXSTUBS__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
7f555861
JS
104
105motif:
acbd13a3 106 make -f makefile.unx all GUI='-D__WXMOTIF__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lpng -lzlib -lXm -lXmu -lXt -lXpm -lX11 -lm'
7f555861 107
f97c9854 108gtk:
acbd13a3 109 make -f makefile.unx all GUI='-D__WXGTK__ -D__UNIX__' GUISUFFIX='_gtk' GUILDLIBS='-lwx_gtk2 $(COMPLIBS) -ldl -lgtk -lgdk -lglib -lpng -lzlib -lX11 -lm -pthread'
f97c9854 110
7f555861 111cleanstubs:
acbd13a3 112 make -f makefile.unx clean GUI='-D__WXSTUBS__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
7f555861
JS
113
114cleanmotif:
acbd13a3
JS
115 make -f makefile.unx clean GUI='-D__WXMOTIF__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
116
117cleangtk:
118 make -f makefile.unx clean GUI='-D__WXGTK__ -D__UNIX__' GUISUFFIX='_gtk'
7f555861
JS
119
120$(OBJDIR):
121 mkdir $(OBJDIR)
122