Makefile 1.18 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 = g++
Erik Faye-Lund's avatar
Erik Faye-Lund committed
6
CPPFLAGS = -I.. -DUNIT_TESTING -DDEBUG
Erik Faye-Lund's avatar
Erik Faye-Lund committed
7
8
CFLAGS   = -g
CXXFLAGS = -g
9
10
11
12
13
14

ifdef COMSPEC
EXE_EXT=.exe
else
EXE_EXT=
endif
15

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

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

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

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

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

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

46
47
unit_test$(EXE_EXT): $(TEST_SOURCES) $(TEST_DEPS_SOURCES) $(FRAMEWORK_SOURCES) ../converter/serializer.cpp
	$(LINK.cpp) $^$(LOADLIBES) $(LDLIBS) -o $@
48

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

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