From: Jochen S. <jos...@us...> - 2004-10-18 16:27:39
|
Update of /cvsroot/darkeyetool/det In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26788 Added Files: createMakefile Removed Files: configure Log Message: Habe das alte configure-skript in createMakefile umbenannt. --- configure DELETED --- --- NEW FILE: createMakefile --- #!/bin/sh # $Revision: 1.8 $ # $Date: 2004/10/17 22:39:00 $ case `uname -s` in CYGWIN*) PLATFORM=Cygwin;; FreeBSD | Linux) PLATFORM=UNIX;; *) PLATFORM=UNIX;; esac case ${PLATFORM} in Cygwin) EXT=.exe;; UNIX) EXT=;; esac WX_CONFIG=`which wx-config` if [ -z ${WX_CONFIG} ] then WX_CONFIG=$( (for i in `echo $PATH | sed -e 's/:/ /g` do ls ${i}/wx*-config 2> /dev/null done) | head -1) fi if [ -z ${WX_CONFIG} ] then echo wxWidgets nicht gefunden exit 1 fi rm -f Makefile echo "CXX?=c++" >> Makefile CFLAGS="-O0 -isystem /usr/local/include/ -isystem /usr/include/ -I ./res/ -I ./src/ `${WX_CONFIG} --cxxflags | sed -e 's/-I/-isystem/g'`" echo "CFLAGS=${CFLAGS}" >> Makefile echo "CFLAGS += -w" >> Makefile echo "CFLAGS += -Wall -Werror" >> Makefile echo "CFLAGS += -pedantic -pedantic-errors -Wno-long-long" >> Makefile echo "LFLAGS=`${WX_CONFIG} --libs` -L/lib/ -L/usr/local/lib/" >> Makefile case ${PLATFORM} in Cygwin) echo "LFLAGS += -lxerces-c.dll -mwindows" >> Makefile;; UNIX) echo "LFLAGS += -lxerces-c" >> Makefile;; esac echo "OBJECTS=`echo \`find src/ -name '*.cpp' | sed -e 's/\.cpp\$/\.o/' | grep -v src/detVer.o | grep -v src/vcreate.o\` src/detVer.o`" >> Makefile case ${PLATFORM} in Cygwin) echo "OBJECTS += det.o" >> Makefile;; esac case ${PLATFORM} in Cygwin) echo ".SUFFIXES: .rc" >> Makefile;; esac echo "all: det${EXT}" >> Makefile for i in `find src -name '*.cpp'` do c++ ${CFLAGS} -MM $i -MT `echo $i | sed -e 's/\.cpp\$/\.o/'` >> Makefile done echo "det${EXT}: \$(OBJECTS)" >> Makefile echo " @echo Binde \$@" >> Makefile echo " @\$(CXX) \$(OBJECTS) \$(LFLAGS) -o \$@" >> Makefile echo ".cpp.o:" >> Makefile echo " @echo Kompiliere \$<" >> Makefile echo " @\$(CXX) \$(CFLAGS) -c \$< -o \$@" >> Makefile case ${PLATFORM} in Cygwin) echo ".rc.o:" >> Makefile echo " @echo Verarbeite Ressource \$<" >> Makefile echo " @windres --include-dir /usr/local/include/ -O coff \$< -o \$@" >> Makefile;; esac echo "src/detVer.cpp: vcreate${EXT}" >> Makefile echo " @echo Erzeuge \$@" >> Makefile echo " @./vcreate${EXT}" >> Makefile echo "vcreate${EXT}: src/vcreate.cpp" >> Makefile echo " @echo Binde \$@" >> Makefile echo " @\$(CXX) src/vcreate.cpp -o vcreate" >> Makefile echo "clean:" >> Makefile echo " @echo Raeume auf" >> Makefile echo " @-rm -f det${EXT} vcreate${EXT} src/detVer.cpp src/*.o src/*/*.o " >> Makefile case ${PLATFORM} in Cygwin) echo " @-rm -f det.o" >> Makefile;; esac |