File: Makefile

package info (click to toggle)
tcng 10b-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,644 kB
  • ctags: 2,515
  • sloc: ansic: 19,040; pascal: 4,640; yacc: 2,619; sh: 1,914; perl: 1,546; lex: 772; makefile: 756
file content (58 lines) | stat: -rw-r--r-- 1,587 bytes parent folder | download | duplicates (5)
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
#
# Makefile - Create build support files
#
# Written 2001-2003 by Werner Almesberger
# Copyright 2001,2002 Bivio Networks, Network Robots
# Copyright 2002,2003 Werner Almesberger
#

SPOTLESS=bytesex tcng.spec tcsim.spec rpmrc rpmmacros valgrind.supp

.PHONY:		all rpmstuff dep depend clean spotless immaculate ephemeral

all:		rpmstuff valgrind.supp

bytesex:	bytesex.c
		$(CC) -Wall -o bytesex bytesex.c

rpmstuff:	tcng.spec tcsim.spec rpmrc rpmmacros

tcng.spec:	tcng.spec.in ../VERSION Makefile
		sed 's/\$$VERSION/'`cat ../VERSION`'/g;s|\$$PWD|'`pwd`\|g \
		  <tcng.spec.in >tcng.spec || { rm -f tcng.spec; exit 1; }

#
# Similar to the variables in ../Makefile, but not identical
#
SUGGESTED_KERNEL=`sed '/^$$ wget \(.*\/linux-.*\)/s//\1/p;d' <../README`
SUGGESTED_IPROUTE =`sed '/^$$ wget \(.*\/iproute2-.*\)/s//\1/p;d' <../README`

tcsim.spec:	tcsim.spec.in ../VERSION Makefile ../README
		sed 's/\$$VERSION/'`cat ../VERSION`'/g;s|\$$PWD|g'`pwd`\| \
		  <tcsim.spec.in | \
		  sed 's|\$$SUGGESTED_KERNEL|'$(SUGGESTED_KERNEL)\|g | \
		  sed 's|\$$SUGGESTED_IPROUTE|'$(SUGGESTED_IPROUTE)\|g \
		  >tcsim.spec || { rm -f tcsim.spec; exit 1; }

rpmrc:		Makefile
		echo "macrofiles: `rpm --showrc | \
		  sed '/^macrofiles .*: /s///p;d'`:`pwd`/rpmmacros" >rpmrc

rpmmacros:	Makefile
		echo "%_topdir `pwd`/../rpm" >rpmmacros

valgrind.supp:	valgrind.supp.in Makefile ../config
		{ . ../config; while read l; do eval echo $$l; done; } \
		  <valgrind.supp.in >valgrind.supp

dep depend:

ephemeral:
		echo $(SPOTLESS)

clean:

spotless:	clean
		rm -f $(SPOTLESS)

immaculate:	spotless