File: Makefile.rule

package info (click to toggle)
libmatroska 1.4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 884 kB
  • sloc: cpp: 4,127; makefile: 318; ansic: 289; sh: 14
file content (98 lines) | stat: -rw-r--r-- 2,613 bytes parent folder | download | duplicates (13)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
##
## This Makefile is made for cygwin, but might probably work on any standard UNIX too
##

#****************************************************************************

# DEBUG can be set to YES to include debugging info, or NO otherwise
DEBUG          = YES

# PROFILE can be set to YES to include profiling info, or NO otherwise
PROFILE        = NO

#****************************************************************************

CC     = gcc
CXX    = g++
LD     = gcc
AR     = ar rcvu
RANLIB = ranlib
DEPEND = makedepend
INDENT =indent --gnu-style -ut -ts6 -br -npsl -npcs
DELETE =rm -f

GLOBAL_CFLAGS   = -Wall -Wno-unknown-pragmas -Wno-format 
DEBUG_CFLAGS    = -g -O0 -DDEBUG ${GLOBAL_CFLAGS}
RELEASE_CFLAGS  =  -O2 ${GLOBAL_CFLAGS}

P_OPTIONS = -pedantic

LIBS =

DEBUG_CXXFLAGS   = ${DEBUG_CFLAGS}
RELEASE_CXXFLAGS = ${RELEASE_CFLAGS}

DEBUG_LDFLAGS    = -g
RELEASE_LDFLAGS  =

ifeq (YES, ${DEBUG})
   CFLAGS       = ${DEBUG_CFLAGS} ${INCS} ${P_OPTIONS}
   CXXFLAGS     = ${DEBUG_CXXFLAGS} ${INCS} ${P_OPTIONS}
   LDFLAGS      = ${DEBUG_LDFLAGS}
   DEPENDFLAGS  = ${DEBUG_CFLAGS} ${INCS}
else
   CFLAGS       = ${RELEASE_CFLAGS} ${INCS} ${P_OPTIONS}
   CXXFLAGS     = ${RELEASE_CXXFLAGS} ${INCS} ${P_OPTIONS}
   LDFLAGS      = ${RELEASE_LDFLAGS}
   DEPENDFLAGS  = ${RELEASE_CFLAGS} ${INCS}
endif

ifeq (YES, ${PROFILE})
   CFLAGS   := ${CFLAGS} -pg
   CXXFLAGS := ${CXXFLAGS} -pg
   LDFLAGS  := ${LDFLAGS} -pg
endif

#****************************************************************************
# Preprocessor directives
#****************************************************************************

ifeq (YES, ${PROFILE})
  DEFS =
else
  DEFS =
endif

#****************************************************************************
# Include paths
#****************************************************************************

#INCS := -I/usr/include/g++-2 -I/usr/local/include
#INCS =


#****************************************************************************
# Makefile code common to all platforms
#****************************************************************************

CFLAGS   := ${CFLAGS}   ${DEFS}
CXXFLAGS := ${CXXFLAGS} ${DEFS}

#****************************************************************************
# General rules
#****************************************************************************

indent:
	$(INDENT) --line-length 100 ${SRCS} ${SRCS_HEADERS}
	$(DELETE) *.*~

indent80:
	$(INDENT) --line-length 80 ${SRCS} ${SRCS_HEADERS}
	$(DELETE) *.*~

clean:
	rm -f core *.o *.so *.a *.exe

# what are the source dependencies
depend: $(SRCS)
	$(DEPEND) $(DEPENDFLAGS) $(SRCS)