# Makefile to build the parser and macro expander
# Name of these programs
PROGRAMS = glassup

# Version number of these programs
VERSION = 2

SRCS = glassup.p gup00 gup01 gup02 gup03 gup04 gup05 gup06
JUNK = gup00.o gup01.o gup02.o gup03.o gup04.o gup05.o gup06.o testout 
DOC =  

SKELFILES = make.local

TESTFILES = goodin goodout
TEST= 
MAKEFILE = Makefile

 
DISTFILES = ${SRCS} ${HDRS} ${TESTFILES} ${DOC} ${MAKEFILE}

#++ make module local start, do NOT touch this line. ++
# Installation dependent make variables for ericv on HERMES 

# full path of the ESPRIT environment
ESPRITDIR = /home1/forfun

#  BDIR     : bin directory
BDIR = $(ESPRITDIR)/binA

#  IDIR     : include directory
IDIR = $(ESPRITDIR)/include

#  LDIR     : library directory
LDIR = $(ESPRITDIR)/libA


NFULLDS = $(ESPRITDIR)/ds/nfullgl.ds
NKERNDS = $(ESPRITDIR)/ds/nkerngl.ds

#  HOSTNAME : name of installation machine.
HOSTNAME=hermes

# SYS     : name of operating system or machine type
#     BSD	For generic BSD systems
#     AVIION	For generic DG_UX systems
#     HPUX	For all HP-UX systems
#     SUN	For all SUN systems
#     APOLLO	For all Apollo systems
SYS = AVIION

# CLIBLOC : required C libraries
CLIBLOC =

LINTLIBLOC =

PASLIBLOC =

# CBADADR : address that will cause a core-dump if read or written.
CBADADR = 0

SYSLINTFLAGS = -hpac
SYSCFLAGS = 
SYSCPROFFLAGS =
SYSCDBUGFLAGS =
SYSPFLAGS =
OFLAG= -O
# Collection of host dependent make rules.

### libinstall ###
# MODULE	- module to install
libinstall:
	cp $(MODULE) $(LDIR)/$(MODULE)

### includeinstall ###
# MODULE	- module to install
includeinstall:
	cp $(MODULE) $(IDIR)/$(MODULE)

### maninstall ###
# MAN		- manual page to install
maninstall:
	cp $(MAN) /usr/man/manl

### bininstall ###
# MODULE	- module to install
bininstall:
	cp $(MODULE) $(BDIR)/$(MODULE)
	strip $(BDIR)/$(MODULE)

### arlibinstall ###
# MODULE	- module to install
arlibinstall:
	cp $(MODULE) $(LDIR)/$(MODULE)

LINK.c=$(CC) 
#++ make module local end, do NOT touch this line. ++


# Add rules for the programs themselves here.

install: 
	chmod 755 $(PROGRAMS) 
	cp $(PROGRAMS) $(BDIR)
 
clean:
	rm -f $(JUNK) $(OBJS)  $(PROGRAMS)

distfiles:
	@echo $(DISTFILES) | tr ' ' '\012'

tar:
	tar -cf $(PROGRAMS)$(VERSION).tar $(DISTFILES) 
	compress -f $(PROGRAMS)$(VERSION).tar

setup:
	modmake local ../make.local $(MAKEFILE)

# Non-standard make rules
###
 
# Rules to make the parser and macro expander  #

all: $(PROGRAMS)

# Kernel Unparsers
glassup: 
	glammar -d -p glassup 
test:
	glassup goodin testout
	cmp testout goodout
tex:
	cat gup?? | glammar-pp - unparser.tex 
