summaryrefslogtreecommitdiffstats
path: root/thk04/Makefile.Linux
diff options
context:
space:
mode:
Diffstat (limited to 'thk04/Makefile.Linux')
-rw-r--r--thk04/Makefile.Linux64
1 files changed, 64 insertions, 0 deletions
diff --git a/thk04/Makefile.Linux b/thk04/Makefile.Linux
new file mode 100644
index 0000000..94a593c
--- /dev/null
+++ b/thk04/Makefile.Linux
@@ -0,0 +1,64 @@
+# 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
+# -fno-inline -fno-loop-optimize -fexpensive-optimizations -fpeephole2
+
+CFLAGS = -fPIC -pipe -Wall -O2 -ffast-math -fomit-frame-pointer -DDATADIR=\"$(DATADIR)\"
+
+# choose your compilation architecture
+CFLAGS += -DARCH_X86
+CFLAGS += -DHAVE_MMX
+#CFLAGS += -DARCH_PPC
+CFLAGS += -DHAVE_64BIT
+
+
+
+
+
+
+INCLUDE = -I. `sdl-config --cflags` \
+ `pkg-config --cflags libpng12` \
+ `libmikmod-config --cflags`
+
+LIBS = `sdl-config --libs` \
+ `pkg-config --libs libpng12` \
+ `libmikmod-config --libs`
+
+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
+ ld -E -z now -shared 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