File: Makefile

package info (click to toggle)
ipxripd 0.7-13.1
  • links: PTS
  • area: main
  • in suites: etch-m68k, sarge
  • size: 200 kB
  • ctags: 265
  • sloc: ansic: 2,867; makefile: 74; sh: 32
file content (49 lines) | stat: -rw-r--r-- 851 bytes parent folder | download | duplicates (2)
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

OBJS = ipxd.o ipxripd.o ipxsapd.o ipxsap.o ipxrip.o ipxkern.o ipxutil.o

CFLAGS = -Wall -O2 -g

all: ipxd

dep:
	gcc -M *.c >.depend

install: all
	install --strip ipxd -m 755 $(DESTDIR)/usr/sbin
	install ipxd.8 -m 644 $(DESTDIR)/usr/share/man/man8
	install ipx_ticks.5 -m 644 $(DESTDIR)/usr/share/man/man5

release: 
	mkdir ../release/router
	ln *.c makefile ../release/router

ipxd: $(OBJS)
	$(CC) -o $@ $(OBJS) $(LFLAGS)

clean: 
	rm -f *.o *.a *~ *.bak ipxd .depend

realclean: clean
	rm -f *.tgz


SRCPATH=$(shell pwd)
SRCDIR=$(shell basename $(SRCPATH))
DISTFILE=$(SRCDIR).tgz

dist: tgz
	make dep
	make all

tgz: realclean
	(cd ..; \
         tar cvf - $(SRCDIR) | \
            gzip -9 > $(DISTFILE); \
         mv $(DISTFILE) $(SRCDIR))

#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif