diff options
Diffstat (limited to 'thk04/Makefile.OSX')
-rw-r--r-- | thk04/Makefile.OSX | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/thk04/Makefile.OSX b/thk04/Makefile.OSX new file mode 100644 index 0000000..476c32a --- /dev/null +++ b/thk04/Makefile.OSX @@ -0,0 +1,61 @@ +# why not autoconf/automake here? +# i love simplicity +# i'm still looking for a simple person loving me! + +CC = gcc +CPP = g++ +INSTALL = install -c +PREFIX = /usr/local +DATADIR = $(PREFIX)/share/transhackmeeting + +# debug flags +#CFLAGS = -pipe -ggdb \ +# -DDATADIR=\"$(DATADIR)\" + +# very shamanic lubrifications +CFLAGS = -pipe -Wall -O2 -ffast-math -fomit-frame-pointer -mpowerpc-gfxopt -faltivec \ + -fno-inline -fmove-all-movables -fno-loop-optimize -fexpensive-optimizations -fpeephole2 \ + -DDATADIR=\"$(DATADIR)\" + + + +INCLUDE = -I. `sdl-config --cflags` \ + `pkg-config --cflags libpng12` -I/sw/include + + +# shared libs +#LIBS = `sdl-config --libs` \ +# `pkg-config --libs libpng12` \ +# `libmikmod-config --libs` + +# static libs +LIBS = `sdl-config --static-libs` \ + `libmikmod-config --prefix`/lib/libmikmod.a \ + /sw/lib/libpng12.a -lm -lz + +OBJS = context.o thk.o gen_layer.o scroll_layer.o impl_layers.o \ + jsync.o jutils.o layer.o linklist.o osd.o plugger.o plugin.o \ + png_layer.o screen.o sdl_blit.o sdl_screen.o \ + fastmemcpy.o cpu_accel.o + +all: thk vertigo.so + +thk: $(OBJS) + $(CPP) -o thk $(OBJS) $(LIBS) +# strip $(SOPT) thk + +vertigo.so: vertigo.o + gcc -bundle -flat_namespace -undefined suppress vertigo.o -o vertigo.so + +%.o: %.cpp + $(CPP) $(INCLUDE) $(CFLAGS) -c -o $@ $< + +%.o: %.c + $(CC) $(INCLUDE) $(CFLAGS) -c -o $@ $< + +install: all + $(INSTALL) -s thk $(PREFIX)/bin + $(INSTALL) data/* $(DATADIR) + +clean: + rm -f thk *.o *.so |