#!/bin/make
# Application makefile, generated by the NeXT Interface Builder. 
#
# Changed somewhat to include "segcreate" stuff to instruct the loader to
# build mach
# Name of the application. 
#
NAME = fen

#
# Source files for this application. 
#
SOURCES=alloc.c queues.c allocp.c  findlinks.c minxface.c tumble.c vmedit.c bert.c  freealloc.c misc.c  tumjust.c vmlist.c dump.c  grabspec.c sendbot.c tumtest.c vmreap.c felibtop.c inittask.c sendtop.c usefull.c fetake.c list.c  tumadd.c vm.c

OBJECTS=alloc.o queues.o rcfile.o allocp.o  findlinks.o minxface.o tumble.o vmedit.o bert.o  freealloc.o misc.o  tumjust.o vmlist.o dump.o  grabspec.o sendbot.o tumtest.o vmreap.o felibtop.o inittask.o sendtop.o usefull.o fetake.o list.o  tumadd.o vm.o 
MFILES = TextLab.m TextView.m rcfile.m MyApp.m Controller.m MyFontPanel.m
HFILES = TextView.h MyApp.h Controller.h MyFontPanel.h
CFILES = $(SOURCES) main.c init.c
NIBFILES = FeN.nib MyFontPanel.nib
TIFFFILES = TextLabApp.tiff TextLabDoc.tiff
PSWFILES = 
SNDFILES = 
OTHERFILES = TextLab.iconinfo
# Modern make file by Hugh Daniel 87/4/13
#  This is usefull "alias go 'time  make !* >& zzerrs ; beep &'"
#.SUFFIXES:
#.SUFFIXES:.o .s .c .h .run
#.c.o:
#	$(CC)  -c $(CFLAGS) $*.c
#.c.core:
#	cc $*.c -o $* $(CFLAGS) -lcore $(SUNFALGS)
#.s.o:
#	as $*.s

CC=  cc
LINT=  lint

SUNFLAGS= -lsuntool -lsunwindow -lpixrect
# CFLAGS=  -g -lm -I 
# LFLAGS= $(CFLAGS) -ltermcap
# LFLAGS= $(CFLAGS) -lcur5.0 -ltermcap
#LFLAGS= $(CFLAGS) -lcurses -ltermcap




#
# Libraries used by this application.
#
LIBS =  -lNeXT_s -lsys_s  

#
# Flags to pass on to the compiler and linker.
#
CFLAGS = -gg
LFLAGS= -segcreate __ICON __header TextLab.iconinfo \
	-segcreate __ICON __tiff tifffile

#
# Rules.
#
SRCFILES = $(MFILES) $(HFILES) $(CFILES) $(NIBFILES) $(TIFFFILES) $(PSWFILES) \
	$(OTHERFILES)
OBJFILES = $(MFILES:.m=.o) $(CFILES:.c=.o) $(PSWFILES:.psw=.o) 
DERIVED = $(PSWFILES:.psw=.c) 
GARBAGE = $(DERIVED) core errs tifffile

$(NAME): $(OBJFILES) 
	cat TextLabApp.tiff TextLabDoc.tiff > tifffile
	$(CC) $(CFLAGS) $(LFLAGS) -o $@ $(OBJFILES) $(LIBS) 

clean: 
	-rm -f *.o $(NAME) $(DERIVED) $(GARBAGE) 

help: 
	@echo '  make $(NAME) - to make the application'
	@echo '  make clean -    to remove all files but the source'


#fen: main.o init.o $(OBJECTS)
#	$(CC) main.o init.o $(LFLAGS) $(OBJECTS) -o fen
