summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: bfb1ad3547ddca13a1ae059f6226621dfd0482be (plain)
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
SRCROOT = .
-include MCONFIG

.SUFFIXES: .c .$(O) .S .s .i

.c.$(O):
	$(CC) $(CFLAGS) -c -o $@ $<
.c.s:
	$(CC) $(CFLAGS) -S -o $@ $<
.c.i:
	$(CC) $(CFLAGS) -E -o $@ $<
.S.$(O):
	$(CC) $(CFLAGS) -c -o $@ $<
.S.s:
	$(CC) $(CFLAGS) -E -o $@ $<

all: ipxrelay

ipxrelay$(X): ipxrelay.$(O) $(LIBOBJS)
	$(CC) $(LDFLAGS) -o $@ $^

clean:
	rm -f ipxrelay$(X) *.$(O)

distclean: clean
	rm -f *~ \#*
	rm -f MCONFIG aconfig.h config.lib config.status config.log
	rm -rf autom4te.cache

spotless: distclean
	rm -f configure aconfig.h.in

#
# Autoconf rules
#
autoconf: configure aconfig.h.in

config:	MCONFIG aconfig.h

release:
	$(MAKE) autoconf
	$(MAKE) tftp.spec
	$(MAKE) distclean

MCONFIG: configure MCONFIG.in aconfig.h.in
	if test -x config.status; then \
		./config.status --recheck && ./config.status ; \
	else \
		./configure ; \
	fi

aconfig.h: MCONFIG
	: Generated by side effect

# Adding "configure" to the dependencies serializes this with running
# autoconf, because there are apparently race conditions between
# autoconf and autoheader.
aconfig.h.in: configure.in configure aclocal.m4
	rm -f aconfig.h.in aconfig.h
	autoheader

configure: configure.in aclocal.m4
	rm -rf MCONFIG configure config.log aconfig.h *.cache
	autoconf