X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile;h=a8af53525c769321bfff41aaca875883a5bfc43d;hb=f8bd40b1a7da7d54a84afbc992fe289af85633a5;hp=75a82fa4e59631229f59b51632e29bb2ec99f378;hpb=6d13a5166688e470590692eb91c3915ab332fe36;p=ttedit diff --git a/Makefile b/Makefile old mode 100755 new mode 100644 index 75a82fa..a8af535 --- a/Makefile +++ b/Makefile @@ -1,184 +1,337 @@ -# -# Makefile for TrueType Edit -# -# Author: James Hammons -# Copyright: (c) 2006 Underground Software -# - -ifeq "$(OSTYPE)" "msys" # Win32 - -SYSTYPE = __GCCWIN32__ -EXESUFFIX = .exe -ICON = obj/icon.o -MSG = Win32 on MinGW - -else -#ifeq "$(OSTYPE)" "darwin" -ifeq "darwin" "$(findstring darwin,$(OSTYPE))" # Should catch both 'darwin' and 'darwin7.0' - -SYSTYPE = __GCCUNIX__ -D_OSX_ -EXESUFFIX = -ICON = -MSG = Mac OS X - -else # *nix - -SYSTYPE = __GCCUNIX__ -EXESUFFIX = -ICON = -MSG = generic Unix/Linux - -endif -endif - -# This is ugly, ugly, ugly. Find a way to fix this crap so it's more unified, -# like the SDL based makefiles are... !!! FIX !!! [made initial stab at it] - -### Variables: ### - -#EXEEXT = .exe -RESCOMP = windres -srcdir = ./src -top_srcdir = /local -top_builddir = /local/ -CXX = g++ -TOOLKIT = MSW -TOOLKIT_LOWERCASE = msw -WX_RELEASE = 2.6 -WX_VERSION = $(WX_RELEASE).0 - -# This is OK - -# Note that the -MMD flag is what gives us our automagic dependency information (*.d files) -# Add -g to compile in debuggin information -CXXFLAGS = -MMD -Wall -Wno-switch -Wno-non-virtual-dtor -O2 `wx-config --cxxflags` -g -INCS = -I. -LIBS = `wx-config --libs` - -PROGRAM = ttedit - -# KO si sihT - -OBJECTS = \ - obj/bezier.o \ - obj/charnames.o \ - obj/debug.o \ - obj/glyphpoints.o \ - obj/registry.o \ - obj/ttf.o \ - obj/vector.o \ - obj/$(PROGRAM).o \ - $(ICON) - -BIN_PROGRAM = $(PROGRAM)$(EXESUFFIX) -#Need to fix this shit -ifneq "" "$(ICON)" -RES_PROGRAM_OBJ = obj/$(PROGRAM)_resources.o -else -RES_PROGRAM_OBJ = -endif -BUNDLE = $(BIN_PROGRAM).app/Contents - -### Conditionally set variables: ### - -COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ - __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) \ - $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) -i $(srcdir) -d WXUSINGDLL -i \ - $(srcdir)/../../samples -i $(top_srcdir)/include -o bombs$(EXEEXT) Carbon.r \ - sample.r - -### Targets: ### - -all: checkenv message obj $(BIN_PROGRAM) $(__bombs_bundle___depname) - @echo - @echo "*** Looks like it compiled OK... Give it a whirl!" - -obj: - @mkdir obj - -#install: all - -# Check the compilation environment, barf if not appropriate - -checkenv: - @echo - @echo -n "*** Checking compilation environment... " -ifeq "" "$(shell which wx-config)" - @echo - @echo - @echo "It seems that you don't have the wxWidget development libraries installed." - @echo "If you have installed them, make sure that the wx-config file is somewhere" - @echo "in your path and is executable." - @echo -#Is there a better way to break out of the makefile? -# @break - @breakola! -else - @echo "OK" -endif - -message: -# @echo - @echo "*** Building TTEdit for $(MSG)..." - @echo - -clean: - @echo -n "*** Cleaning out the garbage..." - @rm -rf ./obj - @rm -f $(BIN_PROGRAM) -# rm -rf bombs.app - @echo "done!" - -## This is only done for Win32 at the moment... -# -#ifneq "" "$(ICON)" -#$(ICON): res/$(TARGET).rc res/$(TARGET).ico -# @echo "*** Processing icon..." -# @windres -i res/$(TARGET).rc -o $(ICON) --include-dir=./res -#endif - -# This is only done for Win32 at the moment... - -ifneq "" "$(ICON)" -$(RES_PROGRAM_OBJ): res/$(PROGRAM).rc res/$(PROGRAM).ico - @echo "*** Processing icon..." - @$(RESCOMP) -i$< -o$@ --define __WX$(TOOLKIT)__ --include-dir ./res --define WXUSINGDLL --include-dir $(top_srcdir)/include/wx-2.6 -endif - -obj/%.o: $(srcdir)/%.cpp - @echo "*** Compiling $<..." - @$(CXX) -c -o $@ $(INCS) $(CXXFLAGS) $< - -$(BIN_PROGRAM): $(OBJECTS) $(RES_PROGRAM_OBJ) - @echo "*** Linking it all together..." - @$(CXX) -o $@ $(OBJECTS) $(RES_PROGRAM_OBJ) $(LIBS) -# $(_mac_rezcmd) -# $(_mac_setfilecmd) - -# Mac OSX bundling shit (figure out how to condense this so it works!) - -bombs.app/Contents/PkgInfo: bombs$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(top_srcdir)/src/mac/carbon/wxmac.icns - mkdir -p bombs.app/Contents - mkdir -p bombs.app/Contents/MacOS - mkdir -p bombs.app/Contents/Resources - - sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \ - -e "s/EXECUTABLE/bombs/" \ - -e "s/VERSION/$(WX_VERSION)/" \ - $(top_srcdir)/src/mac/carbon/Info.plist.in >bombs.app/Contents/Info.plist - - echo -n "APPL????" >bombs.app/Contents/PkgInfo - - ln -f bombs$(EXEEXT) bombs.app/Contents/MacOS/bombs - - cp -f $(top_srcdir)/src/mac/carbon/wxmac.icns bombs.app/Contents/Resources/wxmac.icns - -#bundle: $(_BUNDLE_TGT_REF_DEP) - -### Include dependency info, if present: +############################################################################# +# Makefile for building: ttedit +# Generated by qmake (2.01a) (Qt 4.8.3) on: Tue Nov 20 15:23:38 2012 +# Project: ttedit.pro +# Template: app +# Command: /usr/bin/qmake -o Makefile ttedit.pro +############################################################################# + +####### Compiler, tools and options + +CC = gcc +CXX = g++ +DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED +CFLAGS = -pipe -O2 -D_REENTRANT -Wall -W $(DEFINES) +CXXFLAGS = -pipe -O2 -D_REENTRANT -Wall -W $(DEFINES) +INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -Iobj +LINK = g++ +LFLAGS = -Wl,-O1 +LIBS = $(SUBLIBS) -L/usr/lib64/qt4 -lQtGui -L/usr/lib64 -L/usr/lib64/qt4 -L/usr/X11R6/lib -lQtCore -lgthread-2.0 -lrt -lglib-2.0 -lpthread +AR = ar cqs +RANLIB = +QMAKE = /usr/bin/qmake +TAR = tar -cf +COMPRESS = gzip -9f +COPY = cp -f +SED = sed +COPY_FILE = $(COPY) +COPY_DIR = $(COPY) -r +STRIP = strip +INSTALL_FILE = install -m 644 -p +INSTALL_DIR = $(COPY_DIR) +INSTALL_PROGRAM = install -m 755 -p +DEL_FILE = rm -f +SYMLINK = ln -f -s +DEL_DIR = rmdir +MOVE = mv -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p + +####### Output directory + +OBJECTS_DIR = obj/ + +####### Files + +SOURCES = src/ttedit.cpp \ + src/mainwindow.cpp \ + src/editwindow.cpp \ + src/glyphpoints.cpp \ + src/debug.cpp \ + src/toolwindow.cpp \ + src/charwindow.cpp \ + src/vector.cpp \ + src/graphicprimitives.cpp obj/moc_mainwindow.cpp \ + obj/moc_editwindow.cpp \ + obj/moc_toolwindow.cpp \ + obj/moc_charwindow.cpp \ + obj/qrc_ttedit.cpp +OBJECTS = obj/ttedit.o \ + obj/mainwindow.o \ + obj/editwindow.o \ + obj/glyphpoints.o \ + obj/debug.o \ + obj/toolwindow.o \ + obj/charwindow.o \ + obj/vector.o \ + obj/graphicprimitives.o \ + obj/moc_mainwindow.o \ + obj/moc_editwindow.o \ + obj/moc_toolwindow.o \ + obj/moc_charwindow.o \ + obj/qrc_ttedit.o +DIST = /usr/share/qt4/mkspecs/common/unix.conf \ + /usr/share/qt4/mkspecs/common/linux.conf \ + /usr/share/qt4/mkspecs/common/gcc-base.conf \ + /usr/share/qt4/mkspecs/common/gcc-base-unix.conf \ + /usr/share/qt4/mkspecs/common/g++-base.conf \ + /usr/share/qt4/mkspecs/common/g++-unix.conf \ + /usr/share/qt4/mkspecs/qconfig.pri \ + /usr/share/qt4/mkspecs/modules/qt_phonon.pri \ + /usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \ + /usr/share/qt4/mkspecs/features/qt_functions.prf \ + /usr/share/qt4/mkspecs/features/qt_config.prf \ + /usr/share/qt4/mkspecs/features/exclusive_builds.prf \ + /usr/share/qt4/mkspecs/features/default_pre.prf \ + /usr/share/qt4/mkspecs/features/release.prf \ + /usr/share/qt4/mkspecs/features/default_post.prf \ + /usr/share/qt4/mkspecs/features/qt.prf \ + /usr/share/qt4/mkspecs/features/unix/thread.prf \ + /usr/share/qt4/mkspecs/features/moc.prf \ + /usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ + /usr/share/qt4/mkspecs/features/warn_on.prf \ + /usr/share/qt4/mkspecs/features/resources.prf \ + /usr/share/qt4/mkspecs/features/uic.prf \ + /usr/share/qt4/mkspecs/features/yacc.prf \ + /usr/share/qt4/mkspecs/features/lex.prf \ + ttedit.pro +QMAKE_TARGET = ttedit +DESTDIR = +TARGET = ttedit + +first: all +####### Implicit rules + +.SUFFIXES: .o .c .cpp .cc .cxx .C + +.cpp.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cc.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cxx.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.C.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.c.o: + $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" + +####### Build rules + +all: Makefile $(TARGET) + +$(TARGET): $(OBJECTS) + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) + +Makefile: ttedit.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/unix.conf \ + /usr/share/qt4/mkspecs/common/linux.conf \ + /usr/share/qt4/mkspecs/common/gcc-base.conf \ + /usr/share/qt4/mkspecs/common/gcc-base-unix.conf \ + /usr/share/qt4/mkspecs/common/g++-base.conf \ + /usr/share/qt4/mkspecs/common/g++-unix.conf \ + /usr/share/qt4/mkspecs/qconfig.pri \ + /usr/share/qt4/mkspecs/modules/qt_phonon.pri \ + /usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \ + /usr/share/qt4/mkspecs/features/qt_functions.prf \ + /usr/share/qt4/mkspecs/features/qt_config.prf \ + /usr/share/qt4/mkspecs/features/exclusive_builds.prf \ + /usr/share/qt4/mkspecs/features/default_pre.prf \ + /usr/share/qt4/mkspecs/features/release.prf \ + /usr/share/qt4/mkspecs/features/default_post.prf \ + /usr/share/qt4/mkspecs/features/qt.prf \ + /usr/share/qt4/mkspecs/features/unix/thread.prf \ + /usr/share/qt4/mkspecs/features/moc.prf \ + /usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ + /usr/share/qt4/mkspecs/features/warn_on.prf \ + /usr/share/qt4/mkspecs/features/resources.prf \ + /usr/share/qt4/mkspecs/features/uic.prf \ + /usr/share/qt4/mkspecs/features/yacc.prf \ + /usr/share/qt4/mkspecs/features/lex.prf \ + /usr/lib64/qt4/libQtGui.prl \ + /usr/lib64/qt4/libQtCore.prl + $(QMAKE) -o Makefile ttedit.pro +/usr/share/qt4/mkspecs/common/unix.conf: +/usr/share/qt4/mkspecs/common/linux.conf: +/usr/share/qt4/mkspecs/common/gcc-base.conf: +/usr/share/qt4/mkspecs/common/gcc-base-unix.conf: +/usr/share/qt4/mkspecs/common/g++-base.conf: +/usr/share/qt4/mkspecs/common/g++-unix.conf: +/usr/share/qt4/mkspecs/qconfig.pri: +/usr/share/qt4/mkspecs/modules/qt_phonon.pri: +/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri: +/usr/share/qt4/mkspecs/features/qt_functions.prf: +/usr/share/qt4/mkspecs/features/qt_config.prf: +/usr/share/qt4/mkspecs/features/exclusive_builds.prf: +/usr/share/qt4/mkspecs/features/default_pre.prf: +/usr/share/qt4/mkspecs/features/release.prf: +/usr/share/qt4/mkspecs/features/default_post.prf: +/usr/share/qt4/mkspecs/features/qt.prf: +/usr/share/qt4/mkspecs/features/unix/thread.prf: +/usr/share/qt4/mkspecs/features/moc.prf: +/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: +/usr/share/qt4/mkspecs/features/warn_on.prf: +/usr/share/qt4/mkspecs/features/resources.prf: +/usr/share/qt4/mkspecs/features/uic.prf: +/usr/share/qt4/mkspecs/features/yacc.prf: +/usr/share/qt4/mkspecs/features/lex.prf: +/usr/lib64/qt4/libQtGui.prl: +/usr/lib64/qt4/libQtCore.prl: +qmake: FORCE + @$(QMAKE) -o Makefile ttedit.pro + +dist: + @$(CHK_DIR_EXISTS) obj/ttedit1.0.0 || $(MKDIR) obj/ttedit1.0.0 + $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/ttedit1.0.0/ && $(COPY_FILE) --parents src/ttedit.h src/mainwindow.h src/editwindow.h src/glyphpoints.h src/types.h src/debug.h src/toolwindow.h src/charwindow.h src/vector.h src/graphicprimitives.h src/list.h obj/ttedit1.0.0/ && $(COPY_FILE) --parents ttedit.qrc obj/ttedit1.0.0/ && $(COPY_FILE) --parents src/ttedit.cpp src/mainwindow.cpp src/editwindow.cpp src/glyphpoints.cpp src/debug.cpp src/toolwindow.cpp src/charwindow.cpp src/vector.cpp src/graphicprimitives.cpp obj/ttedit1.0.0/ && (cd `dirname obj/ttedit1.0.0` && $(TAR) ttedit1.0.0.tar ttedit1.0.0 && $(COMPRESS) ttedit1.0.0.tar) && $(MOVE) `dirname obj/ttedit1.0.0`/ttedit1.0.0.tar.gz . && $(DEL_FILE) -r obj/ttedit1.0.0 + + +clean:compiler_clean + -$(DEL_FILE) $(OBJECTS) + -$(DEL_FILE) *~ core *.core + + +####### Sub-libraries + +distclean: clean + -$(DEL_FILE) $(TARGET) + -$(DEL_FILE) Makefile + + +check: first + +mocclean: compiler_moc_header_clean compiler_moc_source_clean + +mocables: compiler_moc_header_make_all compiler_moc_source_make_all + +compiler_moc_header_make_all: obj/moc_mainwindow.cpp obj/moc_editwindow.cpp obj/moc_toolwindow.cpp obj/moc_charwindow.cpp +compiler_moc_header_clean: + -$(DEL_FILE) obj/moc_mainwindow.cpp obj/moc_editwindow.cpp obj/moc_toolwindow.cpp obj/moc_charwindow.cpp +obj/moc_mainwindow.cpp: src/mainwindow.h + /usr/bin/moc $(DEFINES) $(INCPATH) src/mainwindow.h -o obj/moc_mainwindow.cpp + +obj/moc_editwindow.cpp: src/types.h \ + src/toolwindow.h \ + src/glyphpoints.h \ + src/editwindow.h + /usr/bin/moc $(DEFINES) $(INCPATH) src/editwindow.h -o obj/moc_editwindow.cpp + +obj/moc_toolwindow.cpp: src/toolwindow.h + /usr/bin/moc $(DEFINES) $(INCPATH) src/toolwindow.h -o obj/moc_toolwindow.cpp + +obj/moc_charwindow.cpp: src/glyphpoints.h \ + src/types.h \ + src/charwindow.h + /usr/bin/moc $(DEFINES) $(INCPATH) src/charwindow.h -o obj/moc_charwindow.cpp + +compiler_rcc_make_all: obj/qrc_ttedit.cpp +compiler_rcc_clean: + -$(DEL_FILE) obj/qrc_ttedit.cpp +obj/qrc_ttedit.cpp: ttedit.qrc \ + res/cursor-zoom.png \ + res/cursor-add-point.png \ + res/cursor-del-poly.png \ + res/toolpal1.png \ + res/cursor-add-poly.png \ + res/cursor-rotate.png \ + res/act-back.png \ + res/ttedit.png \ + res/cursor-del-point.png \ + res/cursor-select-poly.png \ + res/act-charwin.png \ + res/act-forward.png \ + res/cursor-select.png \ + res/cursor-scroll.png + /usr/bin/rcc -name ttedit ttedit.qrc -o obj/qrc_ttedit.cpp + +compiler_image_collection_make_all: obj/qmake_image_collection.cpp +compiler_image_collection_clean: + -$(DEL_FILE) obj/qmake_image_collection.cpp +compiler_moc_source_make_all: +compiler_moc_source_clean: +compiler_uic_make_all: +compiler_uic_clean: +compiler_yacc_decl_make_all: +compiler_yacc_decl_clean: +compiler_yacc_impl_make_all: +compiler_yacc_impl_clean: +compiler_lex_make_all: +compiler_lex_clean: +compiler_clean: compiler_moc_header_clean compiler_rcc_clean + +####### Compile + +obj/ttedit.o: src/ttedit.cpp src/ttedit.h \ + src/mainwindow.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/ttedit.o src/ttedit.cpp + +obj/mainwindow.o: src/mainwindow.cpp src/mainwindow.h \ + src/charwindow.h \ + src/glyphpoints.h \ + src/types.h \ + src/editwindow.h \ + src/toolwindow.h \ + src/ttedit.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/mainwindow.o src/mainwindow.cpp + +obj/editwindow.o: src/editwindow.cpp src/editwindow.h \ + src/types.h \ + src/toolwindow.h \ + src/glyphpoints.h \ + src/charwindow.h \ + src/debug.h \ + src/graphicprimitives.h \ + src/mainwindow.h \ + src/ttedit.h \ + src/vector.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/editwindow.o src/editwindow.cpp + +obj/glyphpoints.o: src/glyphpoints.cpp src/glyphpoints.h \ + src/types.h \ + src/debug.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/glyphpoints.o src/glyphpoints.cpp + +obj/debug.o: src/debug.cpp src/debug.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/debug.o src/debug.cpp + +obj/toolwindow.o: src/toolwindow.cpp src/toolwindow.h \ + src/types.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/toolwindow.o src/toolwindow.cpp + +obj/charwindow.o: src/charwindow.cpp src/charwindow.h \ + src/glyphpoints.h \ + src/types.h \ + src/debug.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/charwindow.o src/charwindow.cpp + +obj/vector.o: src/vector.cpp src/vector.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/vector.o src/vector.cpp + +obj/graphicprimitives.o: src/graphicprimitives.cpp src/graphicprimitives.h \ + src/types.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/graphicprimitives.o src/graphicprimitives.cpp + +obj/moc_mainwindow.o: obj/moc_mainwindow.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_mainwindow.o obj/moc_mainwindow.cpp + +obj/moc_editwindow.o: obj/moc_editwindow.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_editwindow.o obj/moc_editwindow.cpp + +obj/moc_toolwindow.o: obj/moc_toolwindow.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_toolwindow.o obj/moc_toolwindow.cpp + +obj/moc_charwindow.o: obj/moc_charwindow.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_charwindow.o obj/moc_charwindow.cpp + +obj/qrc_ttedit.o: obj/qrc_ttedit.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/qrc_ttedit.o obj/qrc_ttedit.cpp + +####### Install + +install: FORCE + +uninstall: FORCE + +FORCE: --include ./obj/*.d - -### No idea what this does - -#.PHONY: all install uninstall clean distclean bundle