Makefile for MacOS X. From Nic. (bug 697)

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1680 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
meep-eep
2005-04-24 01:45:59 +00:00
parent 1b0054c892
commit fcbe70950f
3 changed files with 63 additions and 18 deletions
+38
View File
@@ -0,0 +1,38 @@
# this is a GNU Makefile. It is not expected to work with anything other
# than gmake
FILES = audio.cpp audioSDL.cpp synch.cpp synchronizer.cpp
TARGET = synch
# For MacOS X: SDL, Ogg and Vorbis are provided as frameworks,
# which require different flags than unix-style shared libs
ifeq ($(shell uname), Darwin)
CFLAGS = -D__MACOSX__
LDFLAGS = -framework Ogg -framework Vorbis -framework SDL \
-framework Cocoa
else
CFLAGS = $(shell sdl-config --cflags)
LDFLAGS = -lvorbisfile -lvorbis $(shell sdl-config --libs)
endif
CFLAGS += -DUSE_SDLAUDIO=1 $(shell fltk-config --cxxflags)
LDFLAGS += $(shell fltk-config --ldflags)
# MacOS X apps need to have a resource fork applied, else the window
# manager will refuse to manage them (which makes the app very
# difficult to use) This rule should be ignored by all non-Mac
# platforms, and it assumes that the Apple Developer Tools and FLTK
# are installed in their default locations. Edit to taste if
# appropriate.
ifeq ($(shell uname), Darwin)
REZ = /Developer/Tools/Rez
RFORK = /usr/local/include/FL/mac.r
$(TARGET)/rsrc: $(TARGET)
$(REZ) -t APPL $(RFORK) -o $(TARGET)
endif
# END silly MacOS X goo
$(TARGET): $(FILES)
$(CC) $(CFLAGS) $(LDFLAGS) $(FILES) -o $@
clean:
$(RM) $(TARGET)
+20 -17
View File
@@ -1,22 +1,25 @@
Ur-Quan Masters Voice-over synchronization tool
For Windows:
Unpack into any directory.
From a DOS prompt, execute Synchronizer.exx from within the UQM content
directory it will write out files into content/timestamp/race
When you are done, archive them, and send to:
tcpaiqgvnmbf28f001@sneakemail.com
To use, select the files you want to play, and hit start.
hitting 'n' is the same as 'Next Screen', and 'p' will pause/unpause.
Hitting 'space' or 'enter' may have adverse effects, so don't
For Linux:
The code can be compiled with:
gcc synch.cpp synchronizer.cpp audioSDL.cpp audio.cpp -o synch -DUSE_SDLAUDIO=1 -lfltk -lvorbisfile -lvorbis `sdl-config --cflags --libs`
To Build:
The code can be compiled with the provided Makefile, Windows
users can build it by installing Cygwin or MinGW and using
the build tools provided. (or by rolling their own Visual Studio
project file, if they have MSVC++, which I don't)
You'll need fltk (1.1.x), oggvorbis, and SDL development libraries
installed.
installed.
If you have any questions or issues, please send them to the e-mail above
To Use:
Place the executable in the UQM content directory and run it.
Select the files you want to play, and hit start.
Hitting 'n' is the same as 'Next Screen', and 'p' will pause/unpause.
Hitting 'space' or 'enter' may have adverse effects, so don't ;)
The program will write out intermediate files into
content/timestamp/[race]
Once finished, use the merge_ts_files.pl script (requires
Perl) to convert the intermediate files into .ts files that
the game uses, and submit the new files to the project via
Bugzilla (http://uqm.stack.nl/cgi-bin/bugs/index.cgi)
+5 -1
View File
@@ -23,7 +23,11 @@
#if (USE_SDLAUDIO == 1)
char AUDIO_TYPE[] = "SDL";
#include <SDL.h>
#ifdef __APPLE__
# include <SDL/SDL.h>
#else
# include <SDL.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <math.h>