annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
c55ea9478c80 Hello Gensokyo!
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
1 CC = gcc
10
e3849cd10ad3 Build an intermediary fmgen.a archive.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
2 CFLAGS += -Wall -pipe -O2 -fno-math-errno -fno-omit-frame-pointer -fno-asynchronous-unwind-tables
e3849cd10ad3 Build an intermediary fmgen.a archive.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
3 CXXFLAGS += -Wall -Wno-write-strings -pipe -O2 -fno-math-errno -fno-exceptions -fno-rtti -fno-omit-frame-pointer -fno-asynchronous-unwind-tables
0
c55ea9478c80 Hello Gensokyo!
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
4
c55ea9478c80 Hello Gensokyo!
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
5 # Uncomment exactly one of the following:
c55ea9478c80 Hello Gensokyo!
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
6 AUDIO_DRV = oss_audio.o
c55ea9478c80 Hello Gensokyo!
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
7 # AUDIO_DRV = alsa_pcm_api.o
c55ea9478c80 Hello Gensokyo!
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
8 # CFLAGS += -DUSE_ALSA=1
c55ea9478c80 Hello Gensokyo!
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
9 # AUDIO_DRV = wave_out.o
c55ea9478c80 Hello Gensokyo!
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
10
1
83859b2e2bae Add build instructions for a shared library.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 0
diff changeset
11 all: pmdwin libpmdwin.so
0
c55ea9478c80 Hello Gensokyo!
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
12 %.o: %.c
10
e3849cd10ad3 Build an intermediary fmgen.a archive.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
13 $(CC) $(CFLAGS) -c -o $@ $<
0
c55ea9478c80 Hello Gensokyo!
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
14
1
83859b2e2bae Add build instructions for a shared library.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 0
diff changeset
15 %.o: %.cpp
10
e3849cd10ad3 Build an intermediary fmgen.a archive.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
16 $(CXX) $(CXXFLAGS) -c -o $@ $<
0
c55ea9478c80 Hello Gensokyo!
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
17
c55ea9478c80 Hello Gensokyo!
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
18 clean:
10
e3849cd10ad3 Build an intermediary fmgen.a archive.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
19 $(RM) *.o fmgen/*.o libfmgen.a libpmdwin.a libpmdwin.so pmdwin
0
c55ea9478c80 Hello Gensokyo!
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
20
6
da588a3fb3cc Make pmdwin a dynamically linked executable.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 1
diff changeset
21 pmdwin: pmd_play.o libpmdwin.so
da588a3fb3cc Make pmdwin a dynamically linked executable.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 1
diff changeset
22 $(CC) -L. -lpmdwin -o $@ pmd_play.o
0
c55ea9478c80 Hello Gensokyo!
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
23
10
e3849cd10ad3 Build an intermediary fmgen.a archive.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
24 libfmgen.a: fmgen/e_expf.o fmgen/opna.o fmgen/psg.o fmgen/rhythmdata.o
e3849cd10ad3 Build an intermediary fmgen.a archive.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
25 $(AR) rc $@ $^
e3849cd10ad3 Build an intermediary fmgen.a archive.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
26
e3849cd10ad3 Build an intermediary fmgen.a archive.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 7
diff changeset
27 libpmdwin.so: pmdwin.o table.o lfg.o $(AUDIO_DRV) libfmgen.a
1
83859b2e2bae Add build instructions for a shared library.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 0
diff changeset
28 $(CC) -shared -o $@ $^