File: Makefile

package info (click to toggle)
dnprogs 2.52
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,644 kB
  • ctags: 4,021
  • sloc: ansic: 26,737; cpp: 10,666; makefile: 832; sh: 537; awk: 13
file content (84 lines) | stat: -rw-r--r-- 2,343 bytes parent folder | download
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
#
# Makefile for Eduardo's & contributed apps
#
include ../Makefile.common
CC        = gcc
INCDIR	  = -I.
LDFLAGS   = 
CFLAGS   += -D_SVID_SOURCE
#------------------------------------------------------------------------------

PROG1OBJS = startnet.o
PROG2OBJS = sethost.o 
PROG4OBJS = dnping.o
PROG5OBJS = ctermd.o
PROG7OBJS = rmtermd.o
PROG8OBJS = copynodes.o

PROG1 = startnet
PROG2 = sethost
PROG4 = dnping
PROG5 = ctermd
PROG7 = rmtermd
PROG8 = dncopynodes
MANPAGES1 = sethost.1 dnping.1
MANPAGES5 = decnet.conf.5
MANPAGES8 = ctermd.8 rmtermd.8 setether.8 dncopynodes.8

ALLPROGS=$(PROG1) $(PROG2) $(PROG4) $(PROG5) $(PROG7) $(PROG8)

all: $(ALLPROGS)

$(PROG1): $(PROG1OBJS) $(DEPLIBDNET)
	$(CC) -o $@ $(CFLAGS) $(PROG1OBJS) -Wl,-Bstatic $(LIBDNET) -Wl,-Bdynamic

$(PROG2): $(PROG2OBJS) $(DEPLIBDNET)
	$(CC) -o $@ $(CFLAGS) $(PROG2OBJS) $(LIBDNET)

$(PROG3): $(PROG3OBJS)
	$(CC) -o $@ $(CFLAGS) $(PROG3OBJS)

$(PROG4): $(PROG4OBJS) $(DEPLIBDNET)
	$(CC) -o $@ $(CFLAGS) $(PROG4OBJS) $(LIBDNET)

$(PROG5): $(PROG5OBJS) $(DEPLIBDNET) $(DEPLIBDAEMON)
	$(CC) -o $@ $(CFLAGS) $(PROG5OBJS) $(LIBDAEMON) $(LIBDNET) $(PTSLIBS)

$(PROG7): $(PROG7OBJS) $(DEPLIBDNET) $(DEPLIBDAEMON)
	$(CC) -o $@ $(CFLAGS) $(PROG7OBJS) $(LIBDAEMON) $(LIBDNET) $(PTSLIBS)

$(PROG8): $(PROG8OBJS) $(DEPLIBDNET)
	$(CC) -o $@ $(CFLAGS) $(PROG8OBJS) $(LIBDNET)


dep:	
	$(CC) $(CFLAGS) -MM *.c >.depend 2>/dev/null

clean:
	rm -f $(PROG1) $(PROG2) $(PROG4) $(PROG5) $(PROG7) $(PROG8) \
	*.o *.a *.so *~ .depend

install:
	install -d $(prefix)/sbin
	install -d $(prefix)/bin
	install -d $(manprefix)/man/man1
	install -d $(manprefix)/man/man5
	install -d $(manprefix)/man/man8
	install -d $(sysconfprefix)/etc
	install -m 0755 $(STRIPBIN) $(PROG2) $(prefix)/bin
	install -m 0755 $(STRIPBIN) $(PROG4) $(prefix)/bin
	install -m 0755 $(STRIPBIN) $(PROG5) $(prefix)/sbin
	install -m 0700 setether.sh $(prefix)/sbin/setether
	install -m 0755 $(STRIPBIN) $(PROG7) $(prefix)/sbin
	install -m 0755 $(STRIPBIN) $(PROG8) $(prefix)/sbin
	install -m 0644 $(MANPAGES1) $(manprefix)/man/man1
	install -m 0644 $(MANPAGES5) $(manprefix)/man/man5
	install -m 0644 $(MANPAGES8) $(manprefix)/man/man8
	if [ ! -f $(sysconfprefix)/etc/decnet.conf ]; then \
		install -m 0644 decnet.conf $(sysconfprefix)/etc/decnet.conf.sample; \
	fi

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