#
# 		       Makefile for Pink shell 3.2b
# 		     Pink House Systems, October 1993
#

CC      = 	c++
CPP     = 	$(CC) -E
LD      = 	ld
STRIP   = 	strip

CFLAGS  =       -O6 -Wall `if [ -f /usr/include/linux/genhd.h ]; then echo -DNEW_INCLUDES; fi`
LDFLAGS =       -lcurses

OBJS    =	tty.o window.o edit.o status.o panel.o psh.o config.o

all:            msg psh window.c tty.c edit.c status.c panel.c psh.c config.c

msg:		
		@echo
		@echo	Making  Pink House Systems shell 3.2b ...
		@echo

.c.o:
		@echo	Compiling $*.c
		@$(CC) -c $(CFLAGS) $*.c

psh:		$(OBJS)
		@echo
		@echo	Linking ...
		@$(CC) -o psh $(OBJS) $(LDFLAGS)
		@echo
		@echo	done.
		@echo

install:
		@$(STRIP) psh

dep:
		@echo 	Making dependencies ...
		@sed '/\#\#\# Dependencies/q' <Makefile >tmp_make
		@(for n in *.c; do $(CPP) -MM $$n; done) >>tmp_make
		@mv tmp_make Makefile
clean:	
		@echo	Cleaning ...
		@rm -f *.o *~
		@rm -f core


### Dependencies
config.o : config.c config.h 
edit.o : edit.c tty.h window.h edit.h config.h 
panel.o : panel.c tty.h window.h status.h config.h panel.h edit.h 
psh.o : psh.c tty.h window.h edit.h config.h status.h panel.h 
status.o : status.c tty.h window.h status.h config.h 
tty.o : tty.c tty.h 
window.o : window.c tty.h window.h 
