277 lines
7.6 KiB
Perl
277 lines
7.6 KiB
Perl
|
#!#############################################################################
|
||
|
#! File: gtk_gnu.t
|
||
|
#! Purpose: tmake template file from which makefile.gnu is generated by running
|
||
|
#! tmake -t gtk_gnu wxwin.pro -o makefile.gnu
|
||
|
#! Author: Vadim Zeitlin, Robert Roebling, Julian Smart
|
||
|
#! Created: 14.07.99
|
||
|
#! Version: $Id$
|
||
|
#!#############################################################################
|
||
|
|
||
|
#${
|
||
|
#! include the code which parses filelist.txt file and initializes
|
||
|
#! %wxCommon, %wxGeneric, %wxHtml, wxUnix and %wxGTK hashes.
|
||
|
IncludeTemplate("filelist.t");
|
||
|
|
||
|
#! now transform these hashes into $project tags
|
||
|
foreach $file (sort keys %wxGeneric) {
|
||
|
next if $wxCommon{$file} =~ /\bR\b/;
|
||
|
|
||
|
$file =~ s/cp?p?$/\$(OBJSUFF)/;
|
||
|
$project{"WXGENERICOBJS"} .= '$(GENDIR)/' . $file . " "
|
||
|
}
|
||
|
|
||
|
foreach $file (sort keys %wxCommon) {
|
||
|
next if $wxCommon{$file} =~ /\bR\b/;
|
||
|
|
||
|
$file =~ s/cp?p?$/\$(OBJSUFF)/;
|
||
|
$project{"WXCOMMONOBJS"} .= '$(COMMDIR)/' . $file . " "
|
||
|
}
|
||
|
|
||
|
foreach $file (sort keys %wxGTK) {
|
||
|
$file =~ s/cp?p?$/\$(OBJSUFF)/;
|
||
|
$project{"WXGTKOBJS"} .= '$(GTKDIR)/' . $file . " "
|
||
|
}
|
||
|
|
||
|
foreach $file (sort keys %wxHTML) {
|
||
|
$file =~ s/cp?p?$/\$(OBJSUFF)/;
|
||
|
$project{"WXHTMLOBJS"} .= '$(HTMLDIR)/' . $file . " "
|
||
|
}
|
||
|
|
||
|
foreach $file (sort keys %wxUNIX) {
|
||
|
$file =~ s/cp?p?$/\$(OBJSUFF)/;
|
||
|
$project{"WXUNIXOBJS"} .= '$(UNIXDIR)/' . $file . " "
|
||
|
}
|
||
|
#$}
|
||
|
# This file was automatically generated by tmake at #$ Now()
|
||
|
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GNU.T!
|
||
|
|
||
|
#
|
||
|
# File: makefile.gnu
|
||
|
# Author: Julian Smart, Robert Roebling, Vadim Zeitlin
|
||
|
# Created: 1993
|
||
|
# Updated: 1999
|
||
|
# Copyright:(c) 1993, AIAI, University of Edinburgh,
|
||
|
# Copyright:(c) 1999, Vadim Zeitlin
|
||
|
# Copyright:(c) 1999, Robert Roebling
|
||
|
#
|
||
|
# Makefile for libwx_gtk.a
|
||
|
|
||
|
# GUI
|
||
|
GUI = gtk
|
||
|
|
||
|
# Replace this with your own path if necessary
|
||
|
WXDIR = ../..
|
||
|
|
||
|
# C++ compiler
|
||
|
CC = gcc
|
||
|
|
||
|
# 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
|
||
|
|
||
|
# Debug/trace mode. 1 or more for debugging.
|
||
|
DEBUG = 1
|
||
|
|
||
|
# Misc options
|
||
|
CPPOPTIONS = __WXGTK__ -D__WXDEBUG__ -fno-rtti -fno-exceptions
|
||
|
COPTIONS = __WXGTK__ -D__WXDEBUG__
|
||
|
CPPWARN = -Wall
|
||
|
CWARN = -Wall
|
||
|
OPTIMISE = -O2
|
||
|
|
||
|
# object file suffix
|
||
|
OBJSUFF =o
|
||
|
|
||
|
# no changes below this line
|
||
|
|
||
|
GUIINCLUDES = `gtk-config --cflags`
|
||
|
|
||
|
WXINC = -I$(WXDIR)/include
|
||
|
WXLIB = $(WXDIR)/lib/libwx_$(GUI).a
|
||
|
INCLUDES = $(WXINC) $(GUIINCLUDES) -I$(WXDIR)/src/png -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/zlib
|
||
|
|
||
|
CPPFLAGS = $(INCLUDES) $(CPPOPTIONS) $(CPPWARN) $(OPTIMISE)
|
||
|
CFLAGS = $(INCLUDES) $(COPTIONS) $(CWARN) $(OPTIMISE)
|
||
|
|
||
|
# 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 $@ $<
|
||
|
|
||
|
# Subordinate library possibilities
|
||
|
|
||
|
GENDIR = $(WXDIR)/src/generic
|
||
|
COMMDIR = $(WXDIR)/src/common
|
||
|
HTMLDIR = $(WXDIR)/src/html
|
||
|
UNIXDIR = $(WXDIR)/src/unix
|
||
|
PNGDIR = $(WXDIR)/src/png
|
||
|
JPEGDIR = $(WXDIR)/src/jpeg
|
||
|
ZLIBDIR = $(WXDIR)/src/zlib
|
||
|
GTKDIR = $(WXDIR)/src/gtk
|
||
|
|
||
|
DOCDIR = $(WXDIR)\docs
|
||
|
|
||
|
GENERICOBJS = \
|
||
|
#$ ExpandList("WXGENERICOBJS");
|
||
|
|
||
|
COMMONOBJS = \
|
||
|
$(COMMDIR)/y_tab.$(OBJSUFF) \
|
||
|
#$ ExpandList("WXCOMMONOBJS");
|
||
|
|
||
|
HTMLOBJS = \
|
||
|
#$ ExpandList("WXHTMLOBJS");
|
||
|
|
||
|
GTKOBJS = \
|
||
|
#$ ExpandList("WXGTKOBJS");
|
||
|
|
||
|
UINXOBJS = \
|
||
|
#$ ExpandList("WXUNIXOBJS");
|
||
|
|
||
|
ZLIBOBJS = \
|
||
|
$(ZLIBDIR)/adler32.$(OBJSUFF) \
|
||
|
$(ZLIBDIR)/compress.$(OBJSUFF) \
|
||
|
$(ZLIBDIR)/crc32.$(OBJSUFF) \
|
||
|
$(ZLIBDIR)/gzio.$(OBJSUFF) \
|
||
|
$(ZLIBDIR)/uncompr.$(OBJSUFF) \
|
||
|
$(ZLIBDIR)/deflate.$(OBJSUFF) \
|
||
|
$(ZLIBDIR)/trees.$(OBJSUFF) \
|
||
|
$(ZLIBDIR)/zutil.$(OBJSUFF) \
|
||
|
$(ZLIBDIR)/inflate.$(OBJSUFF) \
|
||
|
$(ZLIBDIR)/infblock.$(OBJSUFF) \
|
||
|
$(ZLIBDIR)/inftrees.$(OBJSUFF) \
|
||
|
$(ZLIBDIR)/infcodes.$(OBJSUFF) \
|
||
|
$(ZLIBDIR)/infutil.$(OBJSUFF) \
|
||
|
$(ZLIBDIR)/inffast.$(OBJSUFF)
|
||
|
|
||
|
PNGOBJS = \
|
||
|
$(PNGDIR)/png.$(OBJSUFF) \
|
||
|
$(PNGDIR)/pngread.$(OBJSUFF) \
|
||
|
$(PNGDIR)/pngrtran.$(OBJSUFF) \
|
||
|
$(PNGDIR)/pngrutil.$(OBJSUFF) \
|
||
|
$(PNGDIR)/pngpread.$(OBJSUFF) \
|
||
|
$(PNGDIR)/pngtrans.$(OBJSUFF) \
|
||
|
$(PNGDIR)/pngwrite.$(OBJSUFF) \
|
||
|
$(PNGDIR)/pngwtran.$(OBJSUFF) \
|
||
|
$(PNGDIR)/pngwutil.$(OBJSUFF) \
|
||
|
$(PNGDIR)/pngerror.$(OBJSUFF) \
|
||
|
$(PNGDIR)/pngmem.$(OBJSUFF) \
|
||
|
$(PNGDIR)/pngwio.$(OBJSUFF) \
|
||
|
$(PNGDIR)/pngrio.$(OBJSUFF) \
|
||
|
$(PNGDIR)/pngget.$(OBJSUFF) \
|
||
|
$(PNGDIR)/pngset.$(OBJSUFF)
|
||
|
|
||
|
|
||
|
JPEGOBJS = \
|
||
|
$(JPEGDIR)/jcomapi.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jutils.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jerror.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jmemmgr.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jmemnobs.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jcapimin.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jcapistd.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jctrans.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jcparam.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jdatadst.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jcinit.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jcmaster.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jcmarker.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jcmainct.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jcprepct.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jccoefct.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jccolor.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jcsample.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jchuff.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jcphuff.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jcdctmgr.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jfdctfst.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jfdctflt.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jfdctint.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jdapimin.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jdapistd.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jdtrans.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jdatasrc.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jdmaster.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jdinput.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jdmarker.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jdhuff.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jdphuff.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jdmainct.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jdcoefct.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jdpostct.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jddctmgr.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jidctfst.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jidctflt.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jidctint.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jidctred.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jdsample.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jdcolor.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jquant1.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jquant2.$(OBJSUFF) \
|
||
|
$(JPEGDIR)/jdmerge.$(OBJSUFF)
|
||
|
|
||
|
OBJECTS = $(GTKOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJ) $(UNIXOBJS) \
|
||
|
$(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS)
|
||
|
|
||
|
all: $(OBJECTS) $(WXLIB)
|
||
|
|
||
|
$(WXLIB): $(OBJECTS) $(EXTRAOBJS)
|
||
|
ar $(AROPTIONS) $@ $(EXTRAOBJS) $(OBJECTS)
|
||
|
$(RANLIB) $@
|
||
|
|
||
|
$(OBJECTS): $(WXINC)/wx/defs.h $(WXINC)/wx/object.h $(WXINC)/wx/setup.h
|
||
|
|
||
|
$(COMMDIR)/y_tab.$(OBJSUFF): $(COMMDIR)/y_tab.c $(COMMDIR)/lex_yy.c
|
||
|
$(CCLEX) -c $(CFLAGS) -DNO_CONFIGURE -o $@ $(COMMDIR)/y_tab.c
|
||
|
|
||
|
|
||
|
$(COMMDIR)/lex_yy.c: $(COMMDIR)/lexer.l
|
||
|
$(LEX) -o $(COMMDIR)/lex.yy.c $(COMMDIR)/lexer.l
|
||
|
sed -e "s/BUFSIZ/5000/g" < $(COMMDIR)/lex.yy.c | \
|
||
|
sed -e "s/yyoutput(c)/void yyoutput(c)/g" | \
|
||
|
sed -e "s/YYLMAX 200/YYLMAX 5000/g" > $(COMMDIR)/lex_yy.c
|
||
|
rm -f $(COMMDIR)/lex.yy.c
|
||
|
|
||
|
# Replace yacc with bison if you run into compilation
|
||
|
# problems with y_tab.c.
|
||
|
$(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y
|
||
|
$(YACC) $(COMMDIR)/parser.y
|
||
|
mv y.tab.c $(COMMDIR)/y_tab.c
|
||
|
|
||
|
clean:
|
||
|
rm -f $(GTKDIR)/*.$(OBJSUFF)
|
||
|
rm -f $(COMMDIR)/y_tab.c
|
||
|
rm -f $(COMMDIR)/lex_yy.c
|
||
|
rm -f $(COMMDIR)/*.$(OBJSUFF)
|
||
|
rm -f $(GENDIR)/*.$(OBJSUFF)
|
||
|
rm -f $(PNGDIR)/*.$(OBJSUFF)
|
||
|
rm -f $(ZLIBDIR)/*.$(OBJSUFF)
|
||
|
rm -f $(JPEGDIR)/*.$(OBJSUFF)
|
||
|
rm -f $(UNIXDIR)/*.$(OBJSUFF)
|
||
|
rm -f $(HTMLDIR)/*.$(OBJSUFF)
|
||
|
rm -f $(WXWIN)/lib/libwx_$(GUI).a
|
||
|
|
||
|
cleanall: clean
|
||
|
|
||
|
MFTYPE=gnu
|
||
|
makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(GUI)_$(MFTYPE).t
|
||
|
cd $(WXWIN)\distrib\msw\tmake
|
||
|
tmake -t $(GUI)_$(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
|
||
|
copy makefile.$(MFTYPE) $(WXWIN)\src\$(GUI)
|