X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7f555861b7e50f335c7b929bb76be38e9ebd69c5..e459f82d0110709444984bf739314f4a84de48d3:/src/make.env?ds=sidebyside diff --git a/src/make.env b/src/make.env index a5a1a2d4a1..7df2eca3cf 100644 --- a/src/make.env +++ b/src/make.env @@ -4,22 +4,12 @@ # Common makefile settings for wxWindows programs # This file is included by all the other makefiles, thus changes # made here take effect everywhere (except where overriden). +# RCS-ID: $Id$ # -# An alternative to editing this file is to create a shell script -# to export specific variables, and call make with the -e switch -# to override makefile variables. See wx/install/install.txt. -# And you can override specific variables on the make command line, e.g. -# -# make -f makefile.unix DEBUG='' -# -# You may prefer to use the GNU configure script than raw makefiles - -# see contrib/wxshlib. -# - ########################### Programs ################################# # Replace this with your own path if necessary -WXDIR = /home/jacs/wx2 +WXDIR = $(WXWIN) # C++ compiler CC = g++ @@ -32,6 +22,8 @@ CCLEX = $(CCC) LEX = lex YACC = yacc +# Note: if using bison, use -y option for yacc compatibility +# YACC = bison -y MAKE = make AROPTIONS = ruv RANLIB = ranlib @@ -39,14 +31,14 @@ RANLIB = ranlib ############################ Switches ################################# # Debug/trace mode. 1 or more for debugging. -DEBUG = 0 -GUI = -D__WXSTUBS__ -D__LINUX__ -D__UNIX__ +DEBUG = 1 +GUI = -D__WXSTUBS__ -D__UNIX__ GUISUFFIX = _stubs ########################## Compiler flags ############################# # Misc options -OPTIONS = -D__WXDEBUG__ -DWXDEBUG +OPTIONS = -D__LINUX__ -D__WXDEBUG__ COPTIONS = DEBUGFLAGS = -ggdb INCLUDE = @@ -65,7 +57,7 @@ XLIB = -L/usr/local/X11/lib -L/usr/openwin/lib -L/usr/X11/lib -L/usr/X11R ############################ Libraries ################################ COMPLIBS = -lstdc++ -GUILDLIBS = -lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm +GUILDLIBS = -lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lXpm -lX11 -lm ############################# Suffixes ################################ @@ -85,8 +77,8 @@ INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(COMPPATHS) # Directory for object files OBJDIR = objects$(GUISUFFIX) -CPPFLAGS = $(EXTRACPPFLAGS) $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(WARN) $(OPT) -CFLAGS = $(EXTRACFLAGS) $(XINCLUDE) $(INC) $(COPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(CWARN) $(OPT) +CPPFLAGS = $(EXTRACPPFLAGS) $(INC) $(XINCLUDE) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) +CFLAGS = $(EXTRACFLAGS) $(INC) $(XINCLUDE) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT) LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS) @@ -94,27 +86,36 @@ LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS) .SUFFIXES: .o .cpp .c .c.o : - $(CC) -c $(CFLAGS) -o $@ $< + $(CCC) -c $(CFLAGS) -o $@ $< .cpp.o : $(CC) -c $(CPPFLAGS) -o $@ $< +.C.o : + $(CC) -c $(CPPFLAGS) -o $@ $< + ####################### Targets to allow multiple GUIs #################### dummy: echo Use a target: one of motif, stubs stubs: - make -f makefile.unx all GUI='-D__WXSTUBS__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm' + make -f makefile.unx all GUI='-D__WXSTUBS__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm' motif: - make -f makefile.unx all GUI='-D__WXMOTIF__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm' + make -f makefile.unx all GUI='-D__WXMOTIF__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lpng -lzlib -lXm -lXmu -lXt -lXpm -lX11 -lm' + +gtk: + 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' cleanstubs: - make -f makefile.unx clean GUI='-D__WXSTUBS__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm' + make -f makefile.unx clean GUI='-D__WXSTUBS__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm' cleanmotif: - make -f makefile.unx clean GUI='-D__WXMOTIF__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm' + make -f makefile.unx clean GUI='-D__WXMOTIF__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm' + +cleangtk: + make -f makefile.unx clean GUI='-D__WXGTK__ -D__UNIX__' GUISUFFIX='_gtk' $(OBJDIR): mkdir $(OBJDIR)