9base

revived minimalist port of Plan 9 userland to Unix
git clone git://git.suckless.org/9base
Log | Files | Refs | README | LICENSE

Makefile (931B)


      1 # sam - sam shell unix port from plan9
      2 # Depends on ../lib9
      3 
      4 TARG      = sam
      5 OFILES= sam.o address.o buff.o cmd.o disk.o error.o file.o\
      6 	io.o list.o mesg.o moveto.o multi.o rasp.o regexp.o\
      7 	shell.o string.o sys.o unix.o util.o xec.o
      8 MANFILES  = sam.1
      9 
     10 include ../config.mk
     11 
     12 all: ${TARG}
     13 	@strip ${TARG}
     14 	@echo built ${TARG}
     15 
     16 install: ${TARG}
     17 	@mkdir -p ${DESTDIR}${PREFIX}/bin
     18 	@cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/
     19 	@chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG}
     20 	@mkdir -p ${DESTDIR}${MANPREFIX}/man1
     21 	@cp -f ${MANFILES} ${DESTDIR}${MANPREFIX}/man1
     22 	@chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES}
     23 
     24 uninstall:
     25 	rm -f ${DESTDIR}${PREFIX}/bin/${TARG}
     26 	rm -f ${DESTDIR}${MANPREFIX}/man1/${MANFILES}
     27 
     28 .c.o:
     29 	@echo CC $*.c
     30 	@${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c
     31 
     32 clean:
     33 	rm -f ${OFILES} ${TARG}
     34 
     35 ${TARG}: ${OFILES}
     36 	@echo LD ${TARG}
     37 	@${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -L${PREFIX}/lib -L../lib9 -l9 -lm