[Scummvm-cvs-logs] SF.net SVN: scummvm:[46474] tools/branches/gsoc2009-gui
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Tue Dec 22 01:15:11 CET 2009
Revision: 46474
http://scummvm.svn.sourceforge.net/scummvm/?rev=46474&view=rev
Author: fingolfin
Date: 2009-12-22 00:15:11 +0000 (Tue, 22 Dec 2009)
Log Message:
-----------
GUI TOOLS: Fix some typos and convert the build system to be fully based on configure; also make the build system more like the one in ScummVM
Modified Paths:
--------------
tools/branches/gsoc2009-gui/Makefile
tools/branches/gsoc2009-gui/configure
Added Paths:
-----------
tools/branches/gsoc2009-gui/Makefile.common
Modified: tools/branches/gsoc2009-gui/Makefile
===================================================================
--- tools/branches/gsoc2009-gui/Makefile 2009-12-22 00:12:59 UTC (rev 46473)
+++ tools/branches/gsoc2009-gui/Makefile 2009-12-22 00:15:11 UTC (rev 46474)
@@ -7,40 +7,45 @@
srcdir ?= .
-DEFINES := -DUNIX
-STANDALONE :=
-# This one will go away once all tools are converted
-NO_MAIN := -DEXPORT_MAIN
-LDFLAGS := $(LDFLAGS)
+DEFINES := -DHAVE_CONFIG_H
+LDFLAGS :=
INCLUDES := -I. -I$(srcdir)
LIBS :=
OBJS :=
DEPDIR := .deps
-# Load the make rules generated by configure
-# HACK: We don't yet support configure in the tools SVN module, but at least one can
-# manually create a config.mk files with overrides, if needed.
--include config.mk
+MODULES :=
+# HACK: Until we get proper module support, add these "module dirs" to
+# get the dependency tracking code working.
+MODULE_DIRS := ./ utils/ common/ gui/
-CXXFLAGS += -g
+STANDALONE :=
+# This one will go away once all tools are converted
+NO_MAIN := -DEXPORT_MAIN
-# Additional warnings
-CXXFLAGS:= -Wall $(CXXFLAGS)
-# Turn off some annoying and not-so-useful warnings
-CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder
-# Enable even more warnings...
-#CXXFLAGS+= -pedantic # -pedantic is too pedantic, at least on Mac OS X
-CXXFLAGS+= -Wpointer-arith -Wcast-align
-CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor -Wwrite-strings
-# Enable checking of pointers returned by "new"
-CXXFLAGS+= -fcheck-new
+# Load the make rules generated by configure
+-include config.mk
-# There is a nice extra warning that flags variables that are potentially
-# used before being initialized. Very handy to catch a certain kind of
-# bugs. Unfortunately, it only works when optimizations are turned on,
-# which is why we normally don't use it.
-#CXXFLAGS+= -O -Wuninitialized
+ifeq "$(HAVE_GCC)" "1"
+ # Additional warnings
+ CXXFLAGS:= -Wall $(CXXFLAGS)
+ # Turn off some annoying and not-so-useful warnings
+ CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder
+ # Enable even more warnings...
+ #CXXFLAGS+= -pedantic # -pedantic is too pedantic, at least on Mac OS X
+ CXXFLAGS+= -Wpointer-arith -Wcast-align
+ CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor -Wwrite-strings
+
+ # Enable checking of pointers returned by "new"
+ CXXFLAGS+= -fcheck-new
+
+ # There is a nice extra warning that flags variables that are potentially
+ # used before being initialized. Very handy to catch a certain kind of
+ # bugs. Unfortunately, it only works when optimizations are turned on,
+ # which is why we normally don't use it.
+ #CXXFLAGS+= -O -Wuninitialized
+endif
#######################################################################
# Default commands - put the necessary replacements in config.mk #
@@ -55,129 +60,19 @@
RM_REC ?= $(RM) -r
ZIP ?= zip -q
-CC := gcc
-CXX := g++
-
#######################################################################
-# HACK: Until we get proper module support, add these "module dirs" to
-# get the dependency tracking code working.
-MODULE_DIRS := ./ utils/ common/ gui/
+include $(srcdir)/Makefile.common
-#######################################################################
-
-TARGETS := \
- decine$(EXEEXT) \
- dekyra$(EXEEXT) \
- descumm$(EXEEXT) \
- desword2$(EXEEXT) \
- degob$(EXEEXT) \
- tools_cli$(EXEEXT) \
- tools_gui$(EXEEXT)
-
-UTILS := \
- common/file.o \
- common/md5.o \
- common/util.o \
- utils/adpcm.o \
- utils/audiostream.o \
- utils/voc.o \
- utils/wave.o
-
-all: $(TARGETS)
-
-install: $(TARGETS)
- for i in $^ ; do install -p -m 0755 $$i $(DESTDIR) ; done
-
-bundle_name = ScummVM\ Tools.app
-bundle: $(TARGETS)
- mkdir -p $(bundle_name)
- mkdir -p $(bundle_name)/Contents
- mkdir -p $(bundle_name)/Contents/MacOS
- mkdir -p $(bundle_name)/Contents/Resources
- echo "APPL????" > $(bundle_name)/Contents/PkgInfo
- cp $(srcdir)/dist/macosx/Info.plist $(bundle_name)/Contents/
- cp $(srcdir)/gui/media/*.* $(bundle_name)/Contents/Resources
- cp tools_gui$(EXEEXT) $(bundle_name)/Contents/MacOS/
-
-decine$(EXEEXT): decine.o
- $(CXX) $(LDFLAGS) -o $@ $+
-
-dekyra$(EXEEXT): dekyra.o dekyra_v1.o $(UTILS)
- $(CXX) $(LDFLAGS) -o $@ $+
-
-descumm$(EXEEXT): descumm-tool.o descumm.o descumm6.o descumm-common.o tool.o $(UTILS)
- $(CXX) $(LDFLAGS) -o $@ $+
-
-desword2$(EXEEXT): desword2.o tool.o $(UTILS)
- $(CXX) $(LDFLAGS) -o $@ $+
-
-degob$(EXEEXT): degob.o degob_script.o degob_script_v1.o degob_script_v2.o degob_script_v3.o \
- degob_script_v4.o degob_script_v5.o degob_script_v6.o degob_script_bargon.o \
- tool.o $(UTILS)
- $(CXX) $(LDFLAGS) -o $@ $+
-
-create_sjisfnt$(EXEEXT): create_sjisfnt.o $(UTILS)
- $(CXX) $(LDFLAGS) `freetype-config --libs` -liconv -o $@ $+
-
-tools_gui$(EXEEXT): gui/main.o gui/pages.o gui/gui_tools.o compress_agos.o compress_gob.o compress_kyra.o \
- compress_queen.o compress_saga.o compress_scumm_bun.o compress_scumm_san.o compress_scumm_sou.o \
- compress_sword1.o compress_sword2.o compress_touche.o compress_tucker.o compress_tinsel.o \
- extract_agos.o extract_cine.o extract_gob_stk.o extract_kyra.o extract_loom_tg16.o extract_mm_apple.o \
- extract_mm_c64.o extract_mm_nes.o extract_parallaction.o extract_scumm_mac.o extract_t7g_mac.o \
- encode_dxa.o extract_zak_c64.o kyra_pak.o kyra_ins.o compress.o tool.o tools.o $(UTILS)
- $(CXX) $(LDFLAGS) -o $@ $+ $(WXLIBS) $(LIBS)
-
-tools_cli$(EXEEXT): main_cli.o tools_cli.o compress_agos.o compress_gob.o compress_kyra.o \
- compress_queen.o compress_saga.o compress_scumm_bun.o compress_scumm_san.o compress_scumm_sou.o \
- compress_sword1.o compress_sword2.o compress_touche.o compress_tucker.o compress_tinsel.o \
- extract_agos.o extract_cine.o extract_gob_stk.o extract_kyra.o extract_loom_tg16.o extract_mm_apple.o \
- extract_mm_c64.o extract_mm_nes.o extract_parallaction.o extract_scumm_mac.o extract_t7g_mac.o \
- encode_dxa.o extract_zak_c64.o kyra_pak.o kyra_ins.o compress.o tool.o tools.o $(UTILS)
- $(CXX) $(LDFLAGS) -o $@ $+ $(LIBS)
-
-sword2_clue$(EXEEXT): sword2_clue.o
- $(CXX) $(LDFLAGS) -o $@ $+ `pkg-config --libs gtk+-2.0`
-
-gui/main.o: gui/main.cpp gui/main.h gui/configuration.h gui/pages.h
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(WXINCLUDES) -c gui/main.cpp -o gui/main.o
-
-gui/pages.o: gui/pages.cpp gui/pages.h gui/main.h gui/gui_tools.h
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(WXINCLUDES) -c gui/pages.cpp -o gui/pages.o
-
-create_sjisfnt.o: create_sjisfnt.cpp util.h
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) `freetype-config --cflags` -c create_sjisfnt.cpp -o create_sjisfnt.o
-
-tools_gui.o: tools_gui.cpp tools_gui.h
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(WXINCLUDES) -c tools_gui.cpp -o tools_gui.o
-
-gui/gui_tools.o: gui/gui_tools.cpp gui/gui_tools.h
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(WXINCLUDES) -c gui/gui_tools.cpp -o gui/gui_tools.o
-
-sword2_clue.o: sword2_clue.cpp
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) `pkg-config --cflags gtk+-2.0` -c sword2_clue.cpp
-
-clean:
- rm -f $(addsuffix *.o,$(MODULE_DIRS)) $(TARGETS)
-
-######################################################################
-# The build rules follow - normally you should have no need to
-# touch whatever comes after here.
-######################################################################
-
-# Concat DEFINES and INCLUDES to form the CPPFLAGS
-CPPFLAGS := $(DEFINES) $(INCLUDES)
-
-# Include the build instructions for all modules
-#-include $(addprefix $(srcdir)/, $(addsuffix /module.mk,$(MODULES)))
-
-# Depdir information
-DEPDIRS = $(addsuffix $(DEPDIR),$(MODULE_DIRS))
-DEPFILES =
-
-%.o: %.cpp
- $(MKDIR) $(*D)/$(DEPDIR)
- $(CXX) $(NO_MAIN) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
-
-# Include the dependency tracking files.
--include $(wildcard $(addsuffix /*.d,$(DEPDIRS)))
+# check if configure has been run or has been changed since last run
+config.h config.mk: $(srcdir)/configure
+ifeq "$(findstring config.mk,$(MAKEFILE_LIST))" "config.mk"
+ @echo "Running $(srcdir)/configure with the last specified parameters"
+ @sleep 2
+ LDFLAGS="$(SAVED_LDFLAGS)" CXX="$(SAVED_CXX)" \
+ CXXFLAGS="$(SAVED_CXXFLAGS)" CPPFLAGS="$(SAVED_CPPFLAGS)" \
+ ASFLAGS="$(SAVED_ASFLAGS)" WINDRESFLAGS="$(SAVED_WINDRESFLAGS)" \
+ $(srcdir)/configure $(SAVED_CONFIGFLAGS)
+else
+ $(error You need to run $(srcdir)/configure before you can run make. Check $(srcdir)/configure --help for a list of parameters)
+endif
Added: tools/branches/gsoc2009-gui/Makefile.common
===================================================================
--- tools/branches/gsoc2009-gui/Makefile.common (rev 0)
+++ tools/branches/gsoc2009-gui/Makefile.common 2009-12-22 00:15:11 UTC (rev 46474)
@@ -0,0 +1,128 @@
+# This file is used by Makefile and declares common build rules,
+# a list of common object files etc.
+#
+# $URL$
+# $Id$
+
+
+# TODO: This file should be restructured and much of it moved
+# to module.mk style files.
+
+
+#######################################################################
+
+TARGETS := \
+ decine$(EXEEXT) \
+ dekyra$(EXEEXT) \
+ descumm$(EXEEXT) \
+ desword2$(EXEEXT) \
+ degob$(EXEEXT) \
+ tools_cli$(EXEEXT) \
+ tools_gui$(EXEEXT)
+
+UTILS := \
+ common/file.o \
+ common/md5.o \
+ common/util.o \
+ utils/adpcm.o \
+ utils/audiostream.o \
+ utils/voc.o \
+ utils/wave.o
+
+all: $(TARGETS)
+
+install: $(TARGETS)
+ for i in $^ ; do install -p -m 0755 $$i $(DESTDIR) ; done
+
+bundle_name = ScummVM\ Tools.app
+bundle: $(TARGETS)
+ mkdir -p $(bundle_name)
+ mkdir -p $(bundle_name)/Contents
+ mkdir -p $(bundle_name)/Contents/MacOS
+ mkdir -p $(bundle_name)/Contents/Resources
+ echo "APPL????" > $(bundle_name)/Contents/PkgInfo
+ cp $(srcdir)/dist/macosx/Info.plist $(bundle_name)/Contents/
+ cp $(srcdir)/gui/media/*.* $(bundle_name)/Contents/Resources
+ cp tools_gui$(EXEEXT) $(bundle_name)/Contents/MacOS/
+
+decine$(EXEEXT): decine.o
+ $(CXX) $(LDFLAGS) -o $@ $+
+
+dekyra$(EXEEXT): dekyra.o dekyra_v1.o $(UTILS)
+ $(CXX) $(LDFLAGS) -o $@ $+
+
+descumm$(EXEEXT): descumm-tool.o descumm.o descumm6.o descumm-common.o tool.o $(UTILS)
+ $(CXX) $(LDFLAGS) -o $@ $+
+
+desword2$(EXEEXT): desword2.o tool.o $(UTILS)
+ $(CXX) $(LDFLAGS) -o $@ $+
+
+degob$(EXEEXT): degob.o degob_script.o degob_script_v1.o degob_script_v2.o degob_script_v3.o \
+ degob_script_v4.o degob_script_v5.o degob_script_v6.o degob_script_bargon.o \
+ tool.o $(UTILS)
+ $(CXX) $(LDFLAGS) -o $@ $+
+
+create_sjisfnt$(EXEEXT): create_sjisfnt.o $(UTILS)
+ $(CXX) $(LDFLAGS) `freetype-config --libs` -liconv -o $@ $+
+
+tools_gui$(EXEEXT): gui/main.o gui/pages.o gui/gui_tools.o compress_agos.o compress_gob.o compress_kyra.o \
+ compress_queen.o compress_saga.o compress_scumm_bun.o compress_scumm_san.o compress_scumm_sou.o \
+ compress_sword1.o compress_sword2.o compress_touche.o compress_tucker.o compress_tinsel.o \
+ extract_agos.o extract_cine.o extract_gob_stk.o extract_kyra.o extract_loom_tg16.o extract_mm_apple.o \
+ extract_mm_c64.o extract_mm_nes.o extract_parallaction.o extract_scumm_mac.o extract_t7g_mac.o \
+ encode_dxa.o extract_zak_c64.o kyra_pak.o kyra_ins.o compress.o tool.o tools.o $(UTILS)
+ $(CXX) $(LDFLAGS) -o $@ $+ $(WXLIBS) $(LIBS)
+
+tools_cli$(EXEEXT): main_cli.o tools_cli.o compress_agos.o compress_gob.o compress_kyra.o \
+ compress_queen.o compress_saga.o compress_scumm_bun.o compress_scumm_san.o compress_scumm_sou.o \
+ compress_sword1.o compress_sword2.o compress_touche.o compress_tucker.o compress_tinsel.o \
+ extract_agos.o extract_cine.o extract_gob_stk.o extract_kyra.o extract_loom_tg16.o extract_mm_apple.o \
+ extract_mm_c64.o extract_mm_nes.o extract_parallaction.o extract_scumm_mac.o extract_t7g_mac.o \
+ encode_dxa.o extract_zak_c64.o kyra_pak.o kyra_ins.o compress.o tool.o tools.o $(UTILS)
+ $(CXX) $(LDFLAGS) -o $@ $+ $(LIBS)
+
+sword2_clue$(EXEEXT): sword2_clue.o
+ $(CXX) $(LDFLAGS) -o $@ $+ `pkg-config --libs gtk+-2.0`
+
+gui/main.o: gui/main.cpp gui/main.h gui/configuration.h gui/pages.h
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(WXINCLUDES) -c gui/main.cpp -o gui/main.o
+
+gui/pages.o: gui/pages.cpp gui/pages.h gui/main.h gui/gui_tools.h
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(WXINCLUDES) -c gui/pages.cpp -o gui/pages.o
+
+create_sjisfnt.o: create_sjisfnt.cpp util.h
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) `freetype-config --cflags` -c create_sjisfnt.cpp -o create_sjisfnt.o
+
+tools_gui.o: tools_gui.cpp tools_gui.h
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(WXINCLUDES) -c tools_gui.cpp -o tools_gui.o
+
+gui/gui_tools.o: gui/gui_tools.cpp gui/gui_tools.h
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(WXINCLUDES) -c gui/gui_tools.cpp -o gui/gui_tools.o
+
+sword2_clue.o: sword2_clue.cpp
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) `pkg-config --cflags gtk+-2.0` -c sword2_clue.cpp
+
+clean:
+ rm -f $(addsuffix *.o,$(MODULE_DIRS)) $(TARGETS)
+
+######################################################################
+# The build rules follow - normally you should have no need to
+# touch whatever comes after here.
+######################################################################
+
+# Concat DEFINES and INCLUDES to form the CPPFLAGS
+CPPFLAGS := $(DEFINES) $(INCLUDES)
+
+# Include the build instructions for all modules
+#-include $(addprefix $(srcdir)/, $(addsuffix /module.mk,$(MODULES)))
+
+# Depdir information
+DEPDIRS = $(addsuffix $(DEPDIR),$(MODULE_DIRS))
+DEPFILES =
+
+%.o: %.cpp
+ $(MKDIR) $(*D)/$(DEPDIR)
+ $(CXX) $(NO_MAIN) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
+
+# Include the dependency tracking files.
+-include $(wildcard $(addsuffix /*.d,$(DEPDIRS)))
Property changes on: tools/branches/gsoc2009-gui/Makefile.common
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Rev Author URL Id
Added: svn:eol-style
+ native
Modified: tools/branches/gsoc2009-gui/configure
===================================================================
--- tools/branches/gsoc2009-gui/configure 2009-12-22 00:12:59 UTC (rev 46473)
+++ tools/branches/gsoc2009-gui/configure 2009-12-22 00:15:11 UTC (rev 46474)
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# configure -- custom configure script for ScummVM Tools.
+# configure -- custom configure script for the ScummVM tools.
#
# ScummVM is the legal property of its developers, whose names
# are too numerous to list here. Please refer to the COPYRIGHT
@@ -255,8 +255,8 @@
-h, --help display this help and exit
Installation directories:
- --prefix=DIR use this prefix for installing ScummVM [/usr/local]
- --bindir=DIR directory to install the scummvm binary in [PREFIX/bin]
+ --prefix=DIR use this prefix for installing the Tools [/usr/local]
+ --bindir=DIR directory to install the tool binaries in [PREFIX/bin]
--mandir=DIR directory to install the manpage in [PREFIX/share/man]
--libdir=DIR directory to install the plugins in [PREFIX/lib]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list