home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume24 / hp / Makefile < prev    next >
Encoding:
Makefile  |  1991-03-13  |  558 b   |  35 lines

  1. # makefile for 'hp' --- reverse polish notation calculator
  2.  
  3. CFLAGS= -O
  4. YFLAGS= -d
  5. DESTDIR=/usr/local/bin
  6. MANSEC=l
  7. CP= cp
  8.  
  9. OBJS = hp.o hp.gram.o hp.scan.o
  10.  
  11. hp: $(OBJS)
  12.     $(CC) $(CFLAGS) $(OBJS) -lm -ll -o hp
  13.  
  14. hp.scan.o : y.tab.h
  15.     lex hp.scan.l
  16.     cc -O -c lex.yy.c
  17.     rm lex.yy.c
  18.     mv lex.yy.o hp.scan.o
  19.  
  20. hp.gram.o y.tab.h : hp.gram.y
  21.  
  22. install: hp hp.1
  23.     $(CP) hp $(DESTDIR)
  24.     $(CP) hp.1 /usr/man/man$(MANSEC)/hp.$(MANSEC)
  25.  
  26. print:
  27.     pr hp.gram.y hp.scan.l hp.h hp.c | lpr
  28.     nroff -man hp.1 | col | lpr
  29.  
  30. clean:
  31.     rm -f $(OBJS) hp.gram.c y.tab.h
  32.  
  33. clobber: clean
  34.     rm -f hp
  35.