File: build

package info (click to toggle)
elk 3.0-6
  • links: PTS
  • area: main
  • in suites: potato, slink
  • size: 4,068 kB
  • ctags: 3,123
  • sloc: ansic: 20,686; lisp: 5,232; makefile: 419; awk: 91; sh: 21
file content (101 lines) | stat: -rwxr-xr-x 1,884 bytes parent folder | download | duplicates (3)
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
99
100
101
. ../../config/system
. ../../config/site

if [ _$gdbm = _yes ]; then
    gdbm_c="gdbm.c"
    gdbm_o="gdbm.o"
    gdbm_rule="gdbm.o:		\$(H) gdbm.c"
else
    gdbm_incl=
fi

echo Building Makefile.local...
cat <<EOT >Makefile.local
# This Makefile was produced by running ./build in this directory.

SHELL=/bin/sh

CC= ${cc-cc}
CFLAGS= $cflags $obj_cflags
LINTFLAGS= $lintflags

INC=	../../include

H=	\$(INC)/compat.h\\
	\$(INC)/config.h\\
	\$(INC)/cstring.h\\
	\$(INC)/exception.h\\
	\$(INC)/extern.h\\
	\$(INC)/funcproto.h\\
	\$(INC)/gc.h\\
	\$(INC)/misc.h\\
	\$(INC)/object.h\\
	\$(INC)/param.h\\
	\$(INC)/stkmem.h\\
	\$(INC)/type.h

C=	bitstring.c\\
	debug.c\\
	elk-eval.c\\
	hack.c\\
	monitor.c\\
	newhandler.c\\
	record.c\\
	regexp.c\\
	struct.c $gdbm_c

O=	bitstring.o\\
	debug.o\\
	elk-eval.o\\
	hack.o\\
	monitor.o\\
	newhandler.o\\
	record.o\\
	regexp.o\\
	struct.o $gdbm_o

.c.o:
	\$(CC) \$(CFLAGS) -I\$(INC) $gdbm_incl -c \$<
	../../scripts/makedl \$@ \$@

all: \$(O)

bitstring.o:	\$(H) bitstring.c
debug.o:	\$(H) debug.c
elk-eval.o:	\$(H) elk-eval.c
hack.o:		\$(H) hack.c
monitor.o:	\$(H) monitor.c
newhandler.o:	\$(H) newhandler.c
record.o:	\$(H) record.c
regexp.o:	\$(H) regexp.c
struct.o:	\$(H) struct.c
$gdbm_rule

install: \$(O)
	-@if [ ! -d $install_dir/lib ]; then \\
	    echo mkdir $install_dir/lib; \\
	    mkdir $install_dir/lib; \\
	fi
	-@if [ ! -d $install_dir/lib/elk ]; then \\
	    echo mkdir $install_dir/lib/elk; \\
	    mkdir $install_dir/lib/elk; \\
	fi
	-@if [ ! -d $install_dir/lib/elk/obj ]; then \\
	    echo mkdir $install_dir/lib/elk/obj; \\
	    mkdir $install_dir/lib/elk/obj; \\
	fi
	@for i in \$(O) ;\\
	do \\
	    echo cp \$\$i $install_dir/lib/elk/obj; \\
	    cp \$\$i $install_dir/lib/elk/obj; \\
	done

lint:
	lint \$(LINTFLAGS) -I\$(INC) $gdbm_incl \$(C)

clean:
	rm -f *.o core

distclean:
	rm -f *.o core lint.out Makefile.local
EOT