# HG changeset patch # User Emmanuel Gil Peyrot # Date 1410191093 -7200 # Node ID e3849cd10ad3879223152c53f4b78b757d7bd3e2 # Parent 4e34698c666b6f3f9e6e059c730f0c479cea2577 Build an intermediary fmgen.a archive. diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ CC = gcc -CFLAGS += -Ifmgen -Wall -pipe -O2 -fno-math-errno -fno-omit-frame-pointer -fno-asynchronous-unwind-tables -CXXFLAGS += -Ifmgen -Wall -Wno-write-strings -pipe -O2 -fno-math-errno -fno-exceptions -fno-rtti -fno-omit-frame-pointer -fno-asynchronous-unwind-tables +CFLAGS += -Wall -pipe -O2 -fno-math-errno -fno-omit-frame-pointer -fno-asynchronous-unwind-tables +CXXFLAGS += -Wall -Wno-write-strings -pipe -O2 -fno-math-errno -fno-exceptions -fno-rtti -fno-omit-frame-pointer -fno-asynchronous-unwind-tables # Uncomment exactly one of the following: AUDIO_DRV = oss_audio.o @@ -10,16 +10,19 @@ AUDIO_DRV = oss_audio.o all: pmdwin libpmdwin.so %.o: %.c - $(CC) $(CFLAGS) -c $< + $(CC) $(CFLAGS) -c -o $@ $< %.o: %.cpp - $(CXX) $(CXXFLAGS) -c $< + $(CXX) $(CXXFLAGS) -c -o $@ $< clean: - $(RM) *.o pmdwin libpmdwin.so + $(RM) *.o fmgen/*.o libfmgen.a libpmdwin.a libpmdwin.so pmdwin pmdwin: pmd_play.o libpmdwin.so $(CC) -L. -lpmdwin -o $@ pmd_play.o -libpmdwin.so: pmdwin.o table.o lfg.o $(AUDIO_DRV) fmgen.o +libfmgen.a: fmgen/e_expf.o fmgen/opna.o fmgen/psg.o fmgen/rhythmdata.o + $(AR) rc $@ $^ + +libpmdwin.so: pmdwin.o table.o lfg.o $(AUDIO_DRV) libfmgen.a $(CC) -shared -o $@ $^ diff --git a/fmgen.c b/fmgen.c deleted file mode 100644 --- a/fmgen.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "fmgen/e_expf.c" -#include "fmgen/psg.c" -#include "fmgen/rhythmdata.c" -#include "fmgen/opna.c" - diff --git a/pmdwin.h b/pmdwin.h --- a/pmdwin.h +++ b/pmdwin.h @@ -10,7 +10,7 @@ #include #include #include -#include "opna.h" +#include "fmgen/opna.h" typedef unsigned char uchar; typedef unsigned short ushort;