plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

makefile (929B)


      1 LIB=/usr/lib/upas
      2 CFLAGS=${UNIX} -g -I. -I../libc -I../common -I/usr/include -I/usr/include/sys
      3 LFLAGS=-g
      4 HOSTNAME=cat /etc/whoami
      5 
      6 .c.o: ; $(CC) -c $(CFLAGS) $*.c
      7 all: mail
      8 
      9 sedfile:
     10 	echo 's+LIBDIR+$(LIB)+g' >sed.file
     11 	echo 's+HOSTNAME+$(HOSTNAME)+g' >>sed.file
     12 
     13 install: sedfile install.fish install.mail.sh
     14 
     15 install.fish:
     16 	cp gone.msg $(LIB)
     17 	sed -f sed.file gone.fishing >$(LIB)/gone.fishing
     18 	-chmod 775 $(LIB)/gone.fishing
     19 	-chown bin $(LIB)/gone.fishing $(LIB)/gone.msg
     20 
     21 install.mail.sh:
     22 	sed -f sed.file mail.sh >/bin/mail
     23 	-chown bin /bin/mail
     24 	-chmod 775 /bin/mail
     25 
     26 install.notify: notify
     27 	cp notify $(LIB)/notify
     28 	-chmod 775 $(LIB)/notify
     29 	-chown bin $(LIB)/notify
     30 
     31 install.mail: mail
     32 	cp mail /bin
     33 	strip /bin/mail
     34 
     35 notify: notify.o
     36 	cc $(LFLAGS) notify.o -o notify
     37 
     38 mail: mail.o ../config/config.o
     39 	cc $(LFLAGS) mail.o ../config/config.o -o mail
     40 
     41 clean:
     42 	-rm -f *.[oOa] core a.out *.sL notify
     43 	-rm -f sed.file mail
     44