-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
45 lines (35 loc) · 1021 Bytes
/
Makefile
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
TGT=noip2
CC=gcc
PKG=noip-2.1.tgz
PREFIX=/usr/local
CONFDIR=${PREFIX}/etc
BINDIR=${PREFIX}/bin
# these defines are for Linux
#LIBS=
#ARCH=linux
# for Mac OS X and BSD systems that have getifaddr(), uncomment the next line
#ARCH=bsd_with_getifaddrs
# for early BSD systems without getifaddrs(), uncomment the next line
#ARCH=bsd
# for solaris, uncomment the next two lines
LIBS=-lsocket -lnsl
ARCH=sunOS
${TGT}: Makefile ${TGT}.c
${CC} -Wall -g -D${ARCH} -DPREFIX=\"${PREFIX}\" ${TGT}.c -o ${TGT} ${LIBS}
install: ${TGT}
if [ ! -d ${BINDIR} ]; then mkdir -p ${BINDIR};fi
if [ ! -d ${CONFDIR} ]; then mkdir -p ${CONFDIR};fi
cp ${TGT} ${BINDIR}/${TGT}
${BINDIR}/${TGT} -C -c /tmp/no-ip2.conf
mv /tmp/no-ip2.conf ${CONFDIR}/no-ip2.conf
package: ${TGT}
rm -f *.bak
mv ${TGT} binaries/${TGT}-`uname -m`
scp a-k:/local/bin/noip2 binaries/noip2-`ssh a-k uname -m`
cd ..; tar zcvf /tmp/${PKG} noip-2.0/*
scp /tmp/${PKG} a-k:/opt/www/${PKG}
rm /tmp/${PKG}
clean:
rm -f *o
rm -f binaries/*
rm -f ${TGT}