one was wrong anyway...) Fixed include dir ordering in wxMotif makefiles (wrong version of zlib.h picked up) and added wxchar.cpp to Motif makefile. Changed buffer.h since there's no wchar.h on my system. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
123 lines
3.6 KiB
Bash
123 lines
3.6 KiB
Bash
# generic.env
|
|
# Linux/generic
|
|
#
|
|
# 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$
|
|
#
|
|
########################### Programs #################################
|
|
|
|
# Replace this with your own path if necessary
|
|
WXDIR = $(WXWIN)
|
|
|
|
# C++ compiler
|
|
CC = g++
|
|
|
|
# C compiler
|
|
CCC = gcc
|
|
|
|
# Compiler for lex/yacc .c programs
|
|
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
|
|
|
|
############################ Switches #################################
|
|
|
|
# Debug/trace mode. 1 or more for debugging.
|
|
DEBUG = 1
|
|
GUI = -D__WXSTUBS__ -D__UNIX__
|
|
GUISUFFIX = _stubs
|
|
|
|
########################## Compiler flags #############################
|
|
|
|
# Misc options
|
|
OPTIONS = -D__LINUX__ -D__WXDEBUG__
|
|
COPTIONS =
|
|
DEBUGFLAGS = -ggdb
|
|
INCLUDE =
|
|
WARN = -Wall -Wno-unused # -w
|
|
CWARN = -Wall -Wno-unused # -w
|
|
OPT = # -O2
|
|
|
|
############################ Includes #################################
|
|
|
|
# Compiler or system-specific include paths
|
|
COMPPATHS =
|
|
XINCLUDE = -I/usr/openwin/include -I/usr/include/X11 -I/usr/include/Xm \
|
|
-I/usr/include/X11/Xm -I/usr/include
|
|
XLIB = -L/usr/local/X11/lib -L/usr/openwin/lib -L/usr/X11/lib -L/usr/X11R6/lib
|
|
|
|
############################ Libraries ################################
|
|
|
|
COMPLIBS = -lstdc++
|
|
GUILDLIBS = -lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lXpm -lX11 -lm
|
|
|
|
############################# Suffixes ################################
|
|
|
|
# Change cpp to c if you want to use main.c instead of main.cpp.
|
|
# Edit wx_setup.h accordingly (USE_C_MAIN=1)
|
|
|
|
OBJSUFF =o
|
|
SRCSUFF =cpp
|
|
MAINSUFF =cpp
|
|
|
|
####################### No changes below this line ####################
|
|
|
|
WXINC = $(WXDIR)/include
|
|
WXLIB = $(WXDIR)/lib/libwx$(GUISUFFIX).a
|
|
INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(COMPPATHS)
|
|
|
|
# Directory for object files
|
|
OBJDIR = objects$(GUISUFFIX)
|
|
|
|
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)
|
|
|
|
# Clears all default suffixes
|
|
.SUFFIXES: .o .cpp .c
|
|
|
|
.c.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__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
|
|
|
|
motif:
|
|
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__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
|
|
|
|
cleanmotif:
|
|
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)
|
|
|