File: Makefile

package info (click to toggle)
tcng 10b-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,636 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 (59 lines) | stat: -rwxr-xr-x 1,299 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
59
#
# Makefile - Build libtccext.a and related files
#
# Written 2001-2004 by Werner Almesberger
# Copyright 2001 Network Robots
# Copyright 2002-2004 Werner Almesberger
#

all:		libtccext.a tcc-ext-test tcc-ext-echo tcc-ext-echoh

include ../../Common.make

C_SRC=tccext.c echo.c echoh_main.c
OBJS=tccext.o echoh.o

CLEAN=$(OBJS) .depend

SPOTLESS=libtccext.a tcc-ext-test tcc-ext-echo tcc-ext-echoh

CFLAGS=$(CFLAGS_WARN) -g -fPIC
KMOD_CFLAGS=-D__KERNEL__ -DMODULE -O -fomit-frame-pointer -fno-strict-aliasing
KINCDIR=$(shell sed '/^KSRC=/s///p;d' <../../config)/include

.PHONY:		all depend dep clean spotless immaculate

libtccext.a:	$(OBJS)
		$(AR) cr libtccext.a $(OBJS)

tcc-ext-test:	tcc-ext-test.in ../../config
		../../scripts/topdir.sh ../.. tcc-ext-test

tcc-ext-echo:	echo.c libtccext.a
		$(CC) $(CFLAGS) -o tcc-ext-echo echo.c -L. -ltccext

tcc-ext-echoh:	echoh_main.c libtccext.a
		$(CC) $(CFLAGS) -o tcc-ext-echoh echoh_main.c -L. -ltccext

$(OBJS):	.depend

dep depend .depend:
		$(CPP) -MM -MG \
		  `echo $(C_SRC) | \
		   sed 's/\<cls_ext_test\.c\>//g'` >.depend || \
		  { rm -f .depend; exit 1; }

ephemeral:
		echo $(CLEAN) $(SPOTLESS)

clean:
		rm -f $(CLEAN)

spotless:	clean
		rm -f $(SPOTLESS)

immaculate:	spotless

ifeq (.depend,$(wildcard .depend))
include .depend
endif