OSDN Git Service

libgcc is no longer needed. Thanks to golgol7777 for pointing out the necessary chang...
[handbrake-jp/handbrake-jp-git.git] / test / module.defs
1 $(eval $(call import.MODULE.defs,TEST,test,LIBHB))
2 $(eval $(call import.GCC,TEST))
3
4 TEST.src/   = $(SRC/)test/
5 TEST.build/ = $(BUILD/)test/
6
7 TEST.c   = $(wildcard $(TEST.src/)*.c)
8 TEST.c.o = $(patsubst $(SRC/)%.c,$(BUILD/)%.o,$(TEST.c))
9
10 TEST.exe = $(BUILD/)$(call TARGET.exe,$(HB.name)CLI)
11
12 TEST.libs = $(LIBHB.a) $(foreach n, \
13         a52 avcodec avformat avutil dca dvdnav dvdread faac faad mkv mpeg2 mp3lame mp4v2 \
14         ogg samplerate swscale theora vorbis vorbisenc x264, \
15         $(CONTRIB.build/)lib/lib$(n).a )
16
17 TEST.install.exe = $(DESTDIR)$(PREFIX/)bin/$(notdir $(TEST.exe))
18
19 ifeq (1,$(LIBICONV.enabled))
20     TEST.libs += $(CONTRIB.build/)lib/libiconv.a
21 endif
22 ifeq (1,$(BZIP2.enabled))
23     TEST.libs += $(CONTRIB.build/)lib/libbz2.a
24 endif
25 ifeq (1,$(ZLIB.enabled))
26     TEST.libs += $(CONTRIB.build/)lib/libz.a
27 endif
28
29 ###############################################################################
30
31 TEST.out += $(TEST.c.o)
32 TEST.out += $(TEST.exe)
33
34 BUILD.out += $(TEST.out)
35 BUILD.out += $(TEST.install.exe)
36
37 ###############################################################################
38
39 TEST.GCC.I += $(LIBHB.GCC.I)
40
41 ifeq ($(BUILD.system),darwin)
42     TEST.GCC.f += IOKit CoreServices AudioToolbox
43     TEST.GCC.l += iconv bz2 z
44 else ifeq ($(BUILD.system),linux)
45     TEST.GCC.l += bz2 z pthread dl m
46 else ifeq ($(BUILD.system),solaris)
47     TEST.GCC.l += bz2 z pthread nsl socket
48 else ifeq (1-mingw,$(BUILD.cross)-$(BUILD.system))
49     TEST.libs += $(CONTRIB.build/)lib/libpthreadGC2.a
50     TEST.GCC.D += PTW32_STATIC_LIB
51     TEST.GCC.l += iberty ws2_32
52         TEST.GCC.args.extra.exe++ += -static
53 endif