-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.in
113 lines (92 loc) · 3.08 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
SHELL=/bin/sh
srcdir=@srcdir@
VPATH=@srcdir@
prefix = @prefix@
libdir = @libdir@
includedir = @includedir@
SRC = snet.c
OBJ = snet.o
LOBJ = snet.lo
INCPATH= @CPPFLAGS@ -I.
DEFS=
OPTOPTS= @OPTOPTS@
CFLAGS= ${DEFS} ${OPTOPTS} ${INCPATH} @CFLAGS@
LDFLAGS= @LDFLAGS@
PROFILED= @PROFILED@
CC= @CC@
INSTALL= @INSTALL@
AWK= @AWK@
LIBTOOL= ./libtool --quiet
TAGSFILE= tags
VERSION= `date +%Y%m%d`
DISTDIR= ../libsnet-${VERSION}
.SUFFIXES: .o .lo
.c.o:
$(LIBTOOL) --mode=compile \
$(CC) -c $(CFLAGS) $<
@if test x_$(PROFILED) = x_true ; then echo "building profiled $@" ; \
( mkdir -p profiled; cd profiled ; ../$(LIBTOOL) --mode=compile \
$(CC) -c $(CFLAGS) -p -I.. -I$(srcdir) `if [ -f $< ]; then echo $<; \
else echo ../$<; fi` >/dev/null 2>&1 ) ; fi
.c.lo:
$(LIBTOOL) --mode=compile \
$(CC) -c $(CFLAGS) $<
@if test x_$(PROFILED) = x_true ; then echo "building profiled $@" ; \
( mkdir -p profiled; cd profiled ; ../$(LIBTOOL) --mode=compile \
$(CC) -c $(CFLAGS) -p -I.. -I$(srcdir) `if [ -f $< ]; then echo $<; \
else echo ../$<; fi` >/dev/null 2>&1 ) ; fi
all: libsnet.la
libsnet.la: $(OBJ) $(LOBJ)
$(LIBTOOL) --mode=link \
$(CC) -o libsnet.la $(LDFLAGS) $(LOBJ) -rpath $(libdir) -version-info 0:0:0
@if test x_$(PROFILED) = x_true ; then echo "building profiled $@" ; \
( cd profiled ; ../$(LIBTOOL) --mode=link \
$(CC) -o libsnet_p.la $(LDFLAGS) $(LOBJ) -rpath $(libdir) \
-version-info 0:0:0 >/dev/null 2>&1 ) ; fi
install: all
mkdir -p $(libdir)
chmod 755 $(libdir)
mkdir -p $(includedir)
chmod 755 $(includedir)
$(INSTALL) -c -m 644 snet.h $(includedir)/snet.h
$(LIBTOOL) --mode=install \
$(INSTALL) -c -m 644 libsnet.la $(libdir)/libsnet.la
@if test x_$(PROFILED) = x_true ; then \
echo "installing profiled libraries" ; \
( cd profiled ; ../$(LIBTOOL) --mode=install \
$(INSTALL) -c -m 644 libsnet_p.la \
$(libdir)/libsnet_p.la >/dev/null 2>&1 ) ; fi
clean:
rm -f *.o *.lo libsnet.la profiled/libsnet_p.la profiled/snet.lo
rm -f *.bak *[Ee]rrs tags
rm -rf .libs profiled/.libs
dist: distclean
mkdir ${DISTDIR}
#tar chfFFX - EXCLUDE . | ( cd ${DISTDIR}; tar xvf - )
tar -c -f - . | ( cd ${DISTDIR}; tar xvpf - -C ${DISTDIR} )
echo ${VERSION} > ${DISTDIR}/VERSION
distclean: clean
rm -f config.log config.status config.cache Makefile libtool config.h
rm -rf autom4te.cache
tags: ${SRC}
cwd=`pwd`; \
for i in ${SRC}; do \
ctags -t -a -f ${TAGSFILE} $$cwd/$$i; \
done
depend:
for i in ${SRC} ; do \
${CC} -M ${DEFS} ${INCPATH} $$i | \
$(AWK) ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
else rec = rec " " $$2 } } \
END { print rec } ' >> makedep; done
sed -n '1,/^# DO NOT DELETE THIS LINE/p' Makefile > Makefile.tmp
cat makedep >> Makefile.tmp
rm makedep
echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile.tmp
echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile.tmp
echo '# see make depend above' >> Makefile.tmp
rm -f Makefile.bak
cp Makefile Makefile.bak
mv Makefile.tmp Makefile
# DO NOT DELETE THIS LINE