1 # FLAC - Free Lossless Audio Codec
2 # Copyright (C) 2001 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
24 # LINKAGE can be forced to -static or -dynamic from invocation if desired, but it defaults to -static
27 BINPATH = ../../obj/bin
28 LIBPATH = ../../obj/lib
29 PROGRAM = $(BINPATH)/$(PROGRAM_NAME)
33 debug : CFLAGS = -g -O0 -DDEBUG $(DEBUG_CFLAGS) -Wall -W $(DEFINES) $(INCLUDES)
34 release : CFLAGS = -O3 -fomit-frame-pointer -funroll-loops -ffast-math -finline-functions -DNDEBUG $(RELEASE_CFLAGS) -Wall -W $(DEFINES) $(INCLUDES)
42 $(LINK) -o $@ $(OBJS) $(LFLAGS) $(LIBS)
45 $(CC) $(CFLAGS) -c $< -o $@
47 $(CC) $(CFLAGS) -E $< -o $@
50 $(NASM) -f elf -d ELF -i i386/ $< -o $@
54 -rm -f $(OBJS) $(PROGRAM)
58 makedepend -- $(CFLAGS) $(INCLUDES) -- *.c