summaryrefslogtreecommitdiff
path: root/sys/src/cmd/upas/misc/unix/makefile
diff options
context:
space:
mode:
authorTaru Karttunen <taruti@taruti.net>2011-03-30 15:46:40 +0300
committerTaru Karttunen <taruti@taruti.net>2011-03-30 15:46:40 +0300
commite5888a1ffdae813d7575f5fb02275c6bb07e5199 (patch)
treed8d51eac403f07814b9e936eed0c9a79195e2450 /sys/src/cmd/upas/misc/unix/makefile
Import sources from 2011-03-30 iso image
Diffstat (limited to 'sys/src/cmd/upas/misc/unix/makefile')
-rwxr-xr-xsys/src/cmd/upas/misc/unix/makefile44
1 files changed, 44 insertions, 0 deletions
diff --git a/sys/src/cmd/upas/misc/unix/makefile b/sys/src/cmd/upas/misc/unix/makefile
new file mode 100755
index 000000000..e00c4f7e8
--- /dev/null
+++ b/sys/src/cmd/upas/misc/unix/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
+