-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile.in
115 lines (89 loc) · 2.38 KB
/
Makefile.in
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
102
103
104
105
106
107
108
109
110
111
112
113
114
VERSION = 0.9.0
CC = @CC@
CFLAGS = -c @CFLAGS@ @DEFS@ -DVERSION='\\\"$(VERSION)\\\"'
LD = @CC@
LDFLAGS = -o $@ @LDFLAGS@
LIBS = @LIBS@
RANLIB = @RANLIB@
INSTALL = @INSTALL@
DESTDIR =
prefix = @prefix@
exec_prefix = @prefix@
datarootdir = @datarootdir@
BINDIR = @bindir@
LIBDIR = @libdir@
MANDIR = @mandir@/man1
SHELL = /bin/sh
DIST = sarien-$(VERSION)
DFILES = configure configure.in Makefile Makefile.wat Makefile.dj \
Rules.in \
README
DDIRS = doc scripts bin etc lib src
V = 0
LIB = libagi.a
BIN = sarien
all: $(LIB) $(BIN)
include src/Makefile
GCOBJS = $(OBJS:.o=.gco)
.SUFFIXES: .c .o .a .in .gco .gcda .gcno
.c.o:
@CMD='$(CC) $(CPPFLAGS) $(CFLAGS) -o $*.o $<'; \
if [ "$(V)" -gt 0 ]; then echo $$CMD; else echo CC $*.o ; fi; \
eval $$CMD
dummy:
depend:
@echo Building dependencies...
@$(CC) $(CFLAGS) $(XCFLAGS) -M $(OBJS:.o=.c) $(XDEPS:.o=.c) >$@
$(OBJS): $(MAKEFILE)
$(LIB): src/$(LIB)
$(BIN): src/$(BIN)
src/$(LIB): $(OBJS)
@CMD='$(AR) r $@ $(OBJS)'; \
if [ "$(V)" -gt 0 ]; then echo $$CMD; else echo AR $@ ; fi; \
eval $$CMD
$(RANLIB) $@
src/$(BIN): $(CLI_OBJS) $(LIB)
@CMD='$(LD) $(LDFLAGS) -o $@ $(CLI_OBJS) $(LIBS) -Lsrc -lagi'; \
if [ "$(V)" -gt 0 ]; then echo $$CMD; else echo LD $@ ; fi; \
eval $$CMD
clean:
@rm -f $(OBJS) src/$(BIN) src/$(LIB)
@rm -f $(GCOBJS) $(OBJS:.o=.gcno) $(OBJS:.o=.gcda)
dist: all-docs dist-prepare dist-subdirs
dist-prepare:
./config.status
rm -Rf $(DIST) $(DIST).tar.gz
mkdir -p $(DIST)
cp -RPp $(DFILES) $(DIST)/
dist-subdirs: $(addprefix dist-,$(DDIRS))
chmod -R u+w $(DIST)/*
tar cvf - $(DIST) | gzip -9c > $(DIST).tar.gz
rm -Rf $(DIST)
ls -l $(DIST).tar.gz
distcheck:
rm -Rf $(DIST)
tar xf $(DIST).tar.gz
(cd $(DIST); ./configure --enable-static --prefix=`pwd`/test-install; make; make check; make install; find test-install)
configure: configure.in
autoconf
check: test
dust:
@echo "<cough, cough>"
# Extra targets:
# 'dist' prepares a distribution package
# 'mark' marks the last RCS revision with the package version number
# 'whatsout' lists the locked files
# 'diff' creates a diff file
# 'rpm' generates an RPM package
# 'nsis' generates a Win32 NSIS installer
dist:
rm -Rf $(DIST) $(DIST).tar.gz
mkdir $(DIST)
$(MAKE) DISTDIR=$(DIST) subdist
chmod -R u+w $(DIST)/*
tar cvf - $(DIST) | gzip -9c > $(DIST).tar.gz
rm -Rf $(DIST)
./config.status
sync
ls -l $(DIST).tar.gz
$(OBJS): Makefile