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 (64 lines) | stat: -rwxr-xr-x 1,487 bytes parent folder | download | duplicates (4)
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
#
# modules/Makefile - Build the test modules
#
# Written 2001-2004 by Werner Almesberger
# Copyright 2001 EPFL-ICA, Network Robots
# Copyright 2002-2004 Werner Almesberger
#

#
# This Makefile tries to mimic the compiler invocation when building for a
# "real" system as closely as possible. This is to ensure that kmod_cc and
# tcmod_cc are truly "drop in" replacements for cc.
#

all:		$(KMODS) $(TCMODS)

include ../../Common.make

KMODS=sch_discard.o cls_unspec.o
TCMODS=q_discard.so f_unspec.so
OBJS=$(KMODS) $(TCMODS)

SPOTLESS=*.o *.so kmod_cc tcmod_cc

KMOD_CC=./kmod_cc
KMOD_CFLAGS=-D__KERNEL__ -DMODULE -O -fomit-frame-pointer -fno-strict-aliasing
KINCDIR=$(shell sed '/^KSRC=/s///p;d' <../../config)/include
KVERSIONNUM=$(shell \
  sed '/KVERSION=\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\
  s//`printf "0x%02x%02x%02x" \1 \2 \3`/p;d' <../../config)
TCMOD_CC=./tcmod_cc
TCMOD_CFLAGS=-shared
CFLAGS=-g -Wall -DKVERSIONNUM=$(KVERSIONNUM)

.SUFFIXES:	.so
.PHONY:		all clean spotless immaculate

all:		$(KMODS) $(TCMODS)

$(OBJS):	Makefile ../../Common.make ../../config
$(KMODS):	kmod_cc
$(TCMODS):	tcmod_cc

kmod_cc:	kmod_cc.in ../../config
		../../scripts/topdir.sh ../.. kmod_cc

tcmod_cc:	tcmod_cc.in ../../config
		../../scripts/topdir.sh ../.. tcmod_cc

.c.o:
		$(KMOD_CC) -c $(CFLAGS) $(KMOD_CFLAGS) -I$(KINCDIR) -o $@ $<

.c.so:
		$(TCMOD_CC) $(CFLAGS) $(TCMOD_CFLAGS) -o $@ $<

ephemeral:
		echo $(SPOTLESS)

clean:

spotless:	clean
		rm -f $(SPOTLESS)

immaculate:	spotless