Mercurial > pmdwin
comparison Makefile @ 10:e3849cd10ad3 default tip
Build an intermediary fmgen.a archive.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Mon, 08 Sep 2014 17:44:53 +0200 |
parents | ceda140f42fb |
children |
comparison
equal
deleted
inserted
replaced
9:4e34698c666b | 10:e3849cd10ad3 |
---|---|
1 CC = gcc | 1 CC = gcc |
2 CFLAGS += -Ifmgen -Wall -pipe -O2 -fno-math-errno -fno-omit-frame-pointer -fno-asynchronous-unwind-tables | 2 CFLAGS += -Wall -pipe -O2 -fno-math-errno -fno-omit-frame-pointer -fno-asynchronous-unwind-tables |
3 CXXFLAGS += -Ifmgen -Wall -Wno-write-strings -pipe -O2 -fno-math-errno -fno-exceptions -fno-rtti -fno-omit-frame-pointer -fno-asynchronous-unwind-tables | 3 CXXFLAGS += -Wall -Wno-write-strings -pipe -O2 -fno-math-errno -fno-exceptions -fno-rtti -fno-omit-frame-pointer -fno-asynchronous-unwind-tables |
4 | 4 |
5 # Uncomment exactly one of the following: | 5 # Uncomment exactly one of the following: |
6 AUDIO_DRV = oss_audio.o | 6 AUDIO_DRV = oss_audio.o |
7 # AUDIO_DRV = alsa_pcm_api.o | 7 # AUDIO_DRV = alsa_pcm_api.o |
8 # CFLAGS += -DUSE_ALSA=1 | 8 # CFLAGS += -DUSE_ALSA=1 |
9 # AUDIO_DRV = wave_out.o | 9 # AUDIO_DRV = wave_out.o |
10 | 10 |
11 all: pmdwin libpmdwin.so | 11 all: pmdwin libpmdwin.so |
12 %.o: %.c | 12 %.o: %.c |
13 $(CC) $(CFLAGS) -c $< | 13 $(CC) $(CFLAGS) -c -o $@ $< |
14 | 14 |
15 %.o: %.cpp | 15 %.o: %.cpp |
16 $(CXX) $(CXXFLAGS) -c $< | 16 $(CXX) $(CXXFLAGS) -c -o $@ $< |
17 | 17 |
18 clean: | 18 clean: |
19 $(RM) *.o pmdwin libpmdwin.so | 19 $(RM) *.o fmgen/*.o libfmgen.a libpmdwin.a libpmdwin.so pmdwin |
20 | 20 |
21 pmdwin: pmd_play.o libpmdwin.so | 21 pmdwin: pmd_play.o libpmdwin.so |
22 $(CC) -L. -lpmdwin -o $@ pmd_play.o | 22 $(CC) -L. -lpmdwin -o $@ pmd_play.o |
23 | 23 |
24 libpmdwin.so: pmdwin.o table.o lfg.o $(AUDIO_DRV) fmgen.o | 24 libfmgen.a: fmgen/e_expf.o fmgen/opna.o fmgen/psg.o fmgen/rhythmdata.o |
25 $(AR) rc $@ $^ | |
26 | |
27 libpmdwin.so: pmdwin.o table.o lfg.o $(AUDIO_DRV) libfmgen.a | |
25 $(CC) -shared -o $@ $^ | 28 $(CC) -shared -o $@ $^ |