aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/upas/misc/makefile
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-10-29 16:26:44 +0000
committerrsc <devnull@localhost>2005-10-29 16:26:44 +0000
commit5cdb17983ae6e6367ad7a940cb219eab247a9304 (patch)
tree8ca1ef49af2a96e7daebe624d91fdf679814a057 /src/cmd/upas/misc/makefile
parentcd3745196389579fb78b9b01ef1daefb5a57aa71 (diff)
downloadplan9port-5cdb17983ae6e6367ad7a940cb219eab247a9304.tar.gz
plan9port-5cdb17983ae6e6367ad7a940cb219eab247a9304.tar.bz2
plan9port-5cdb17983ae6e6367ad7a940cb219eab247a9304.zip
Thanks to John Cummings.
Diffstat (limited to 'src/cmd/upas/misc/makefile')
-rw-r--r--src/cmd/upas/misc/makefile44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/cmd/upas/misc/makefile b/src/cmd/upas/misc/makefile
new file mode 100644
index 00000000..e00c4f7e
--- /dev/null
+++ b/src/cmd/upas/misc/makefile
@@ -0,0 +1,44 @@
+LIB=/usr/lib/upas
+CFLAGS=${UNIX} -g -I. -I../libc -I../common -I/usr/include -I/usr/include/sys
+LFLAGS=-g
+HOSTNAME=cat /etc/whoami
+
+.c.o: ; $(CC) -c $(CFLAGS) $*.c
+all: mail
+
+sedfile:
+ echo 's+LIBDIR+$(LIB)+g' >sed.file
+ echo 's+HOSTNAME+$(HOSTNAME)+g' >>sed.file
+
+install: sedfile install.fish install.mail.sh
+
+install.fish:
+ cp gone.msg $(LIB)
+ sed -f sed.file gone.fishing >$(LIB)/gone.fishing
+ -chmod 775 $(LIB)/gone.fishing
+ -chown bin $(LIB)/gone.fishing $(LIB)/gone.msg
+
+install.mail.sh:
+ sed -f sed.file mail.sh >/bin/mail
+ -chown bin /bin/mail
+ -chmod 775 /bin/mail
+
+install.notify: notify
+ cp notify $(LIB)/notify
+ -chmod 775 $(LIB)/notify
+ -chown bin $(LIB)/notify
+
+install.mail: mail
+ cp mail /bin
+ strip /bin/mail
+
+notify: notify.o
+ cc $(LFLAGS) notify.o -o notify
+
+mail: mail.o ../config/config.o
+ cc $(LFLAGS) mail.o ../config/config.o -o mail
+
+clean:
+ -rm -f *.[oOa] core a.out *.sL notify
+ -rm -f sed.file mail
+