# $RCSfile: Makefile.SH,v 7335Revision: 4.1 7335Date: 92/08/07 18:29:07 $
#
# $Log:	Makefile.SH,v $

CC = cc
YACC = yacc
mansrc = /usr/local/man/man1
manext = 1
LDFLAGS = 
SMALL = 
LARGE =  
mallocsrc = malloc.c
mallocobj = malloc.o
shellflags = 

libs = -lsocket -lnsl -lgdbm -ldl -lm -lc -lcrypt

CCCMD = `sh $(shellflags) cflags $@`

public = a2p s2p find2perl

private = 

manpages = a2p.man s2p.man

util =

sh = Makefile.SH cflags.SH find2perl.SH s2p.SH

h = EXTERN.h INTERN.h ../config.h handy.h hash.h a2p.h str.h util.h

c = hash.c $(mallocsrc) str.c util.c walk.c

obj = hash.o $(mallocobj) str.o util.o walk.o

lintflags = -phbvxac

# grrr
SHELL = /bin/sh

.c.o:
	$(CCCMD) $*.c

all: $(public) $(private) $(util)
	touch all

a2p: $(obj) a2p.o
	$(CC) $(LDFLAGS) $(obj) a2p.o $(libs) -o a2p

a2p.c: a2p.y
	@ echo Expect many shift/reduce and reduce/reduce conflicts...
	$(YACC) a2p.y
	mv y.tab.c a2p.c

a2p.o: a2p.c a2py.c a2p.h EXTERN.h util.h INTERN.h handy.h ../config.h str.h hash.h
	$(CCCMD) $(LARGE) a2p.c

clean:
	rm -f a2p *.o a2p.c

realclean: clean
	rm -f *.orig */*.orig core $(addedbyconf) a2p.c all
	rm -f Makefile cflags find2perl s2p makefile makefile.old

# The following lint has practically everything turned on.  Unfortunately,
# you have to wade through a lot of mumbo jumbo that can't be suppressed.
# If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
# for that spot.

lint:
	lint $(lintflags) $(defs) $(c) > a2p.fuzz

depend: $(mallocsrc) ../makedepend
	../makedepend

clist:
	echo $(c) | tr ' ' '\012' >.clist

hlist:
	echo $(h) | tr ' ' '\012' >.hlist

shlist:
	echo $(sh) | tr ' ' '\012' >.shlist

malloc.c: ../malloc.c
	sed <../malloc.c >malloc.c \
	    -e 's/"perl.h"/"..\/perl.h"/' \
	    -e 's/my_exit/exit/'

# AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
# If this runs make out of memory, delete /usr/include lines.
hash.o: ../config.h
hash.o: /usr/include/ctype.h
hash.o: /usr/include/stdio.h
hash.o: /usr/include/sys/feature_tests.h
hash.o: EXTERN.h
hash.o: a2p.h
hash.o: handy.h
hash.o: hash.c
hash.o: hash.h
hash.o: str.h
hash.o: util.h
malloc.o: ../av.h
malloc.o: ../config.h
malloc.o: ../cop.h
malloc.o: ../cv.h
malloc.o: ../embed.h
malloc.o: ../form.h
malloc.o: ../gv.h
malloc.o: ../handy.h
malloc.o: ../hv.h
malloc.o: ../mg.h
malloc.o: ../op.h
malloc.o: ../opcode.h
malloc.o: ../perl.h
malloc.o: ../perly.h
malloc.o: ../pp.h
malloc.o: ../proto.h
malloc.o: ../regexp.h
malloc.o: ../scope.h
malloc.o: ../sv.h
malloc.o: ../unixish.h
malloc.o: ../util.h
malloc.o: /opt/SUNWspro/SC2.0.1/include/cc/floatingpoint.h
malloc.o: /opt/SUNWspro/SC2.0.1/include/cc/math.h
malloc.o: /opt/SUNWspro/SC2.0.1/include/cc/sunmath.h
malloc.o: /opt/SUNWspro/SC2.0.1/include/cc/sys/ieeefp.h
malloc.o: /usr/include/ctype.h
malloc.o: /usr/include/dirent.h
malloc.o: /usr/include/errno.h
malloc.o: /usr/include/netinet/in.h
malloc.o: /usr/include/setjmp.h
malloc.o: /usr/include/signal.h
malloc.o: /usr/include/stdarg.h
malloc.o: /usr/include/stdio.h
malloc.o: /usr/include/stdlib.h
malloc.o: /usr/include/string.h
malloc.o: /usr/include/sys/byteorder.h
malloc.o: /usr/include/sys/condvar.h
malloc.o: /usr/include/sys/cred.h
malloc.o: /usr/include/sys/dirent.h
malloc.o: /usr/include/sys/dki_lkinfo.h
malloc.o: /usr/include/sys/dl.h
malloc.o: /usr/include/sys/errno.h
malloc.o: /usr/include/sys/feature_tests.h
malloc.o: /usr/include/sys/ioctl.h
malloc.o: /usr/include/sys/isa_defs.h
malloc.o: /usr/include/sys/machlock.h
malloc.o: /usr/include/sys/machsig.h
malloc.o: /usr/include/sys/machtypes.h
malloc.o: /usr/include/sys/mutex.h
malloc.o: /usr/include/sys/param.h
malloc.o: /usr/include/sys/pirec.h
malloc.o: /usr/include/sys/poll.h
malloc.o: /usr/include/sys/procset.h
malloc.o: /usr/include/sys/rwlock.h
malloc.o: /usr/include/sys/select.h
malloc.o: /usr/include/sys/semaphore.h
malloc.o: /usr/include/sys/siginfo.h
malloc.o: /usr/include/sys/signal.h
malloc.o: /usr/include/sys/sleepq.h
malloc.o: /usr/include/sys/stat.h
malloc.o: /usr/include/sys/stream.h
malloc.o: /usr/include/sys/strmdep.h
malloc.o: /usr/include/sys/t_lock.h
malloc.o: /usr/include/sys/time.h
malloc.o: /usr/include/sys/times.h
malloc.o: /usr/include/sys/turnstile.h
malloc.o: /usr/include/sys/types.h
malloc.o: /usr/include/sys/uio.h
malloc.o: /usr/include/sys/unistd.h
malloc.o: /usr/include/sys/vnode.h
malloc.o: /usr/include/time.h
malloc.o: /usr/include/vm/faultcode.h
malloc.o: /usr/include/vm/seg_enum.h
malloc.o: EXTERN.h
malloc.o: malloc.c
str.o: ../config.h
str.o: /usr/include/ctype.h
str.o: /usr/include/stdio.h
str.o: /usr/include/sys/feature_tests.h
str.o: EXTERN.h
str.o: a2p.h
str.o: handy.h
str.o: hash.h
str.o: str.c
str.o: str.h
str.o: util.h
util.o: ../config.h
util.o: /usr/include/ctype.h
util.o: /usr/include/stdio.h
util.o: /usr/include/sys/feature_tests.h
util.o: EXTERN.h
util.o: INTERN.h
util.o: a2p.h
util.o: handy.h
util.o: hash.h
util.o: str.h
util.o: util.c
util.o: util.h
walk.o: ../config.h
walk.o: /usr/include/ctype.h
walk.o: /usr/include/stdio.h
walk.o: /usr/include/sys/feature_tests.h
walk.o: EXTERN.h
walk.o: a2p.h
walk.o: handy.h
walk.o: hash.h
walk.o: str.h
walk.o: util.h
walk.o: walk.c
Makefile: Makefile.SH ../config.sh ; /bin/sh Makefile.SH
cflags: cflags.SH ../config.sh ; /bin/sh cflags.SH
find2perl: find2perl.SH ../config.sh ; /bin/sh find2perl.SH
s2p: s2p.SH ../config.sh ; /bin/sh s2p.SH
# WARNING: Put nothing here or make depend will gobble it up!
