-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
27 lines (22 loc) · 900 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
CC=gcc
CFLAGS=-Wall -ggdb $(shell pkg-config --cflags libzip)
LDFLAGS=-lz -lm $(shell pkg-config --libs libzip)
VGMDIR=
.PHONY: all extract
all: vgm2x
vgm2x: vgm2x.o cmdline.o tools.o libvgm2x.a vgm/libvgminterpreter.a midilib/libmidi.a libfmvoice/libfmvoice.a libvgm/utils/DataLoader.o libvgm/utils/FileLoader.o libvgm/utils/MemoryLoader.o
$(CC) $^ -o $@ $(LDFLAGS)
vgm/libvgminterpreter.a: vgm/commands.o vgm/error.o vgm/header.o vgm/interpreter.o
ar cr $@ $^
libvgm2x.a: chip_analyzer.o opl_analyzer.o opl_voice_collector.o opm_analyzer.o opm_voice_collector.o opn_analyzer.o opn_voice_collector.o vgm_analyzer.o
ar cr $@ $^
midilib/libmidi.a:
cd midilib && make libmidi.a
libfmvoice/libfmvoice.a:
cd libfmvoice && make libfmvoice.a
%.o: %.c
$(CC) -MMD -c $< -o $@ $(CFLAGS)
clean:
rm -f *.o vgm/*.o *.d vgm/*.d vgm/*.a vgm2x *.a
cd libfmvoice && make clean
cd midilib && make clean