src/flac/encode.c : Use flac_snprintf instead of sprintf.
[platform/upstream/flac.git] / build / compile.mk
1 #  FLAC - Free Lossless Audio Codec
2 #  Copyright (C) 2001,2002,2003,2004,2005,2006,2007,2008,2009  Josh Coalson
3 #
4 #  This file is part the FLAC project.  FLAC is comprised of several
5 #  components distributed under difference licenses.  The codec libraries
6 #  are distributed under Xiph.Org's BSD-like license (see the file
7 #  COPYING.Xiph in this distribution).  All other programs, libraries, and
8 #  plugins are distributed under the GPL (see COPYING.GPL).  The documentation
9 #  is distributed under the Gnu FDL (see COPYING.FDL).  Each file in the
10 #  FLAC distribution contains at the top the terms under which it may be
11 #  distributed.
12 #
13 #  Since this particular file is relevant to all components of FLAC,
14 #  it may be distributed under the Xiph.Org license, which is the least
15 #  restrictive of those mentioned above.  See the file COPYING.Xiph in this
16 #  distribution.
17
18 #
19 # GNU makefile fragment for building a library
20 #
21
22 %.debug.o %.release.o : %.c
23         $(CC) $(CFLAGS) -c $< -o $@
24 %.debug.o %.release.o : %.cc
25         $(CCC) $(CFLAGS) -c $< -o $@
26 %.debug.o %.release.o : %.cpp
27         $(CCC) $(CFLAGS) -c $< -o $@
28 %.debug.pic.o %.release.pic.o : %.c
29         $(CC) $(CFLAGS) -fPIC -DPIC -c $< -o $@
30 %.debug.pic.o %.release.pic.o : %.cc
31         $(CCC) $(CFLAGS) -fPIC -DPIC -c $< -o $@
32 %.debug.pic.o %.release.pic.o : %.cpp
33         $(CCC) $(CFLAGS) -fPIC -DPIC -c $< -o $@
34 %.debug.i %.release.i : %.c
35         $(CC) $(CFLAGS) -E $< -o $@
36 %.debug.i %.release.i : %.cc
37         $(CCC) $(CFLAGS) -E $< -o $@
38 %.debug.i %.release.i : %.cpp
39         $(CCC) $(CFLAGS) -E $< -o $@
40
41 %.debug.o %.release.o : %.s
42 ifeq ($(OS),Darwin)
43         #$(CC) -c -arch $(PROC) -Wall -force_cpusubtype_ALL $< -o $@
44         $(AS) -arch $(PROC) -force_cpusubtype_ALL $< -o $@
45 else
46         $(AS) $< -o $@
47 endif
48 %.debug.pic.o %.release.pic.o : %.s
49 ifeq ($(OS),Darwin)
50         #$(CC) -c -arch $(PROC) -Wall -force_cpusubtype_ALL $< -o $@
51         $(AS) -arch $(PROC) -force_cpusubtype_ALL $< -o $@
52 else
53         $(AS) $< -o $@
54 endif
55
56 %.debug.o : %.nasm
57         $(NASM) -f elf -d OBJ_FORMAT_elf -i ia32/ -g $< -o $@
58 %.release.o : %.nasm
59         $(NASM) -f elf -d OBJ_FORMAT_elf -i ia32/ $< -o $@
60 %.debug.pic.o : %.nasm
61         $(NASM) -f elf -d OBJ_FORMAT_elf -i ia32/ -g $< -o $@
62 %.release.pic.o : %.nasm
63         $(NASM) -f elf -d OBJ_FORMAT_elf -i ia32/ $< -o $@