/
Makefile.inc
57 lines (43 loc) · 1.58 KB
/
Makefile.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# VARIABLES #
#compiler specific variables <for ON-FLY compiler settings use the OPT variable>
CC = gcc
CFLAGS = -ggdb3 -pg -Wall -Wextra -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wconversion -Wmissing-declarations -Wunreachable-code -Winline
OPT +=
#header files, libraries, paths ...
INC_PATH= ../inc
INC_FLAG= -I$(INC_PATH)
COMM_DEP= $(INC_PATH)/%.h $(INC_PATH)/common.h $(LIB_PATH)/common.c
LIB_PATH= ../lib
LIB_FLAG= -L$(LIB_PATH)
INS_PATH=
LIBS = -largtable2 -lfftw3 -lfann -lm -lrt -lcorti
#objects, dependencies ... <ONLY FILES or file wildcards are allowed in TAGS variable>
TAGS += ./*.[ch] $(INC_PATH)/*.h $(LIB_PATH)/*.c
OBJ = $(LIB_PATH)/fft.o $(LIB_PATH)/aiff.o $(LIB_PATH)/window.o $(LIB_PATH)/ann.o $(LIB_PATH)/common.o
LIBRARY = $(LIB_PATH)/libcorti.a
PROG = corti
# RULES #
#declare PHONY rules
.PHONY : global_default local_default clean distclean cleantags all cleanall install uninstall
#default rule
global_default: local_default
#tags rules
tags : $(TAGS)
@echo -e "\033[00;32mbuilding tags [$(TAGS)]\033[00m"
@echo "ctags $(TAGS)"
@ctags $(TAGS)\
2>&1 3>&2 1>&3| sed -e "s/^/"`echo -e "\033[00;31m"`"/" -e "s/$$/"`echo -e "\033[00m"`"/"
@echo ""
cleantags:
@echo -e "\033[00;32mcleaning tags\033[00m"
@echo "rm -f tags"
@rm -f tags\
2>&1 3>&2 1>&3| sed -e "s/^/"`echo -e "\033[00;31m"`"/" -e "s/$$/"`echo -e "\033[00m"`"/"
@echo ""
#rules for complete rebuild
all : cleanall global_default
cleanall: clean cleantags
#default rule is trigered only for missing targets
.DEFAULT:
@echo -e "\033[00;31mNo rule to make target '$@'\033[00m"
@exit 1