summaryrefslogtreecommitdiffstats
path: root/mufhd0/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'mufhd0/Makefile')
-rw-r--r--mufhd0/Makefile58
1 files changed, 58 insertions, 0 deletions
diff --git a/mufhd0/Makefile b/mufhd0/Makefile
new file mode 100644
index 0000000..5d86371
--- /dev/null
+++ b/mufhd0/Makefile
@@ -0,0 +1,58 @@
+# 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/mufhd0
+
+#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`
+
+all: mufhd0 water.so
+
+mufhd0: mufhd0.o water.o fixsin.o
+ $(CPP) -o mufhd0 fixsin.o water.o mufhd0.o $(LIBS)
+
+water.so: water.o
+ ld -E -z now -shared water.o -o water.so
+
+%.o: %.cpp
+ $(CPP) $(INCLUDE) $(CFLAGS) -c -o $@ $<
+
+%.o: %.c
+ $(CC) $(INCLUDE) $(CFLAGS) -c -o $@ $<
+
+install: all
+ $(INSTALL) -s mufhd0 $(PREFIX)/bin
+ $(INSTALL) data/* $(DATADIR)
+
+clean:
+ rm -f mufhd0 *.o *.so