mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
Initial revision
This commit is contained in:
37
build/exe.mk
Normal file
37
build/exe.mk
Normal file
@@ -0,0 +1,37 @@
|
||||
#
|
||||
# GNU makefile fragment for building an executable
|
||||
#
|
||||
|
||||
CC = gcc
|
||||
# LINKAGE can be forced to -static or -dynamic from invocation if desired, but it defaults to -static
|
||||
LINKAGE = -static
|
||||
LINK = gcc $(LINKAGE)
|
||||
BINPATH = ../../obj/bin
|
||||
LIBPATH = ../../obj/lib
|
||||
PROGRAM = $(BINPATH)/$(PROGRAM_NAME)
|
||||
|
||||
all : release
|
||||
|
||||
debug : CFLAGS = -g -O0 -DDEBUG $(DEBUG_CFLAGS) -Wall -W $(INCLUDES)
|
||||
release : CFLAGS = -O3 -DNDEBUG $(RELEASE_CFLAGS) -Wall -W $(INCLUDES)
|
||||
|
||||
LFLAGS = -L$(LIBPATH)
|
||||
|
||||
debug : $(PROGRAM)
|
||||
release : $(PROGRAM)
|
||||
|
||||
$(PROGRAM) : $(OBJS)
|
||||
$(LINK) -o $@ $(OBJS) $(LFLAGS) $(LIBS)
|
||||
|
||||
%.o : %.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
%.i : %.c
|
||||
$(CC) $(CFLAGS) -E $< -o $@
|
||||
|
||||
.PHONY : clean
|
||||
clean :
|
||||
-rm -f $(OBJS) $(PROGRAM)
|
||||
|
||||
.PHONY : depend
|
||||
depend:
|
||||
makedepend -- $(CFLAGS) $(INCLUDES) -- *.c
|
||||
Reference in New Issue
Block a user