File: Makefile

package info (click to toggle)
libmatroska 1.7.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 648 kB
  • sloc: cpp: 3,997; ansic: 272; makefile: 43; sh: 12
file content (62 lines) | stat: -rw-r--r-- 1,220 bytes parent folder | download | duplicates (18)
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
# libmatroska core Makefile (used in cygwin)
# $Id: Makefile 640 2004-07-09 21:05:36Z mosu $

# Options
EXTENSION=.cpp
CXXFLAGS=-g -DDEBUG -Wall -Wno-unknown-pragmas -DWIN32 -I../../src/
LDFLAGS=

SRC_DIR=../../src/

# Programs
CXX=g++ -c
LD=g++
DEP=$(CXX) -MM
DEPEND = makedepend
AR = ar rcvu
RANLIB = ranlib

# Librarires
INCLUDE=
LIBS=

# Names
PROGRAM=test00

# source-files
sources:=$(wildcard ${SRC_DIR}*$(EXTENSION))

# header files; replace .cxx extension with .h
headers:=$(patsubst %$(EXTENSION),%.hpp,$(sources))

# files holding dependency information; replace .cxx extension with .dep
dependencies:=$(patsubst %$(EXTENSION),%.dep,$(sources))

# object files; replace .cxx extension with .o
objects:=$(patsubst %$(EXTENSION),%.o,$(sources))

OBJ=$(objects) test00.o

DEPENDFLAGS  = ${CXXFLAGS} ${INCLUDE}

# Build rules
%.o: %$(EXTENSION)
	$(CXX) $(CXXFLAGS) $(INCLUDE) -o $@ $<

$(PROGRAM): $(OBJ)
#	$(AR) $@ $(objects)
#	$(RANLIB) $@
	$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
	${LD} -o $@ ${LDFLAGS} ${OBJ} ${LIBS} ${EXTRA_LIBS}

clean:
	rm -f $(OBJ)
	rm -f $(dependencies)
	rm -f $(PROGRAM)
	rm -f CORE

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

# DO NOT DELETE