Makefile 1.19 KB
Newer Older
Erik Faye-Lund's avatar
Erik Faye-Lund committed
1
2
3
4
# Makefile for pimpmobile module player
# Copyright (C) 2005-2007 Jrn Nystad and Erik Faye-Lund
# For conditions of distribution and use, see copyright notice in LICENSE.TXT

Erik Faye-Lund's avatar
Erik Faye-Lund committed
5
CC = gcc
Erik Faye-Lund's avatar
Erik Faye-Lund committed
6
CPPFLAGS = -I.. -DUNIT_TESTING -DDEBUG
7
CFLAGS   = -g -fprofile-arcs -ftest-coverage
8
9
10
11
12
13

ifdef COMSPEC
EXE_EXT=.exe
else
EXE_EXT=
endif
14

Erik Faye-Lund's avatar
Erik Faye-Lund committed
15
FRAMEWORK_SOURCES = \
16
	framework/test_framework.c \
Erik Faye-Lund's avatar
Erik Faye-Lund committed
17
18
	framework/test_helpers.c \
	framework/test_suite.c
19

Erik Faye-Lund's avatar
Erik Faye-Lund committed
20
21
22
23
24
25
26
TEST_SOURCES = \
	unit_test.c \
	unit/test_mixer.c \
	unit/test_serializer.c

TEST_DEPS_SOURCES = \
	../src/pimp_mixer.c \
27
	../src/pimp_mod_context.c \
Erik Faye-Lund's avatar
Erik Faye-Lund committed
28
	../src/pimp_mixer_portable.c \
29
30
31
	../src/pimp_envelope.c \
	../src/pimp_math.c \
	../src/pimp_render.c \
32
33
	../src/load_xm.c \
	../src/convert_sample.c \
34
	../src/pimp_sample_bank.c
35

Erik Faye-Lund's avatar
Erik Faye-Lund committed
36
.PHONY: clean all run
37
all: unit_test$(EXE_EXT) dump_render$(EXE_EXT)
38
39

clean:
40
	$(RM) unit_test$(EXE_EXT) dump_render$(EXE_EXT)
41

42
43
run: unit_test$(EXE_EXT)
	./unit_test$(EXE_EXT)
44

Erik Faye-Lund's avatar
Erik Faye-Lund committed
45
46
unit_test$(EXE_EXT): $(TEST_SOURCES) $(TEST_DEPS_SOURCES) $(FRAMEWORK_SOURCES) ../converter/serializer.c
	$(LINK.c) $^$(LOADLIBES) $(LDLIBS) -o $@
47

48
dump_render$(EXE_EXT): toplevel/dump_render.c $(TEST_DEPS_SOURCES)
Erik Faye-Lund's avatar
Erik Faye-Lund committed
49
	$(LINK.c) $^$(LOADLIBES) $(LDLIBS) -o $@
Erik Faye-Lund's avatar
Erik Faye-Lund committed
50
51

%.wav : %.sb
Erik Faye-Lund's avatar
Erik Faye-Lund committed
52
	sox -r 44100 $< $@