1 # FLAC - Free Lossless Audio Codec
2 # Copyright (C) 2001,2002 Josh Coalson
4 # This program is part of FLAC; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 # GNU makefile fragment for building an executable
22 ifeq ($(DARWIN_BUILD),yes)
30 # LINKAGE can be forced to -static or -dynamic from invocation if desired, but it defaults to -static except on OSX
31 ifeq ($(DARWIN_BUILD),yes)
36 LINK = $(CC) $(LINKAGE)
37 BINPATH = ../../obj/bin
38 LIBPATH = ../../obj/lib
39 PROGRAM = $(BINPATH)/$(PROGRAM_NAME)
43 include ../../build/config.mk
45 debug : CFLAGS = -g -O0 -DDEBUG $(DEBUG_CFLAGS) -Wall -W -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
46 release : CFLAGS = -O3 -fomit-frame-pointer -funroll-loops -finline-functions -DNDEBUG $(RELEASE_CFLAGS) -Wall -W -Winline -DFLaC__INLINE=__inline__ -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
50 debug : $(ORDINALS_H) $(PROGRAM)
51 release : $(ORDINALS_H) $(PROGRAM)
54 $(LINK) -o $@ $(OBJS) $(LFLAGS) $(LIBS)
57 $(CC) $(CFLAGS) -c $< -o $@
59 $(CCC) $(CFLAGS) -c $< -o $@
61 $(CC) $(CFLAGS) -E $< -o $@
63 $(CCC) $(CFLAGS) -E $< -o $@
66 $(NASM) -f elf -d OBJ_FORMAT_elf -i ia32/ $< -o $@
70 -rm -f $(OBJS) $(PROGRAM)
74 makedepend -- $(CFLAGS) $(INCLUDES) -- *.c