#  makefile for file first.C, example of use of the class String 
 
# declaration of extension used 

MAIN = topLevel-72
OBJECT = order-55.o factory-57.o
# the object to link togheter 


# the next 5 variable are automatically defined by the environment
# CLASS_PATH = $(HOME)/classes
# LIB_PATH = $(CLASS_PATH)/lib/DEC
# CC = g++
# INCSYS =
# SYS_LIB_MOTIF = /usr/lib/DXM/lib/Xm/libXm.a /usr/lib/DXM/lib/Xt/libXt.a
  
CFLAGS = $(SYS_FLAGS)
INCOAK = -I$(CLASS_PATH)/include

OAKLIB = $(LIB_PATH)/oak1.a $(LIB_PATH)/oak.a
RODLIB = $(LIB_PATH)/rodin1.a $(LIB_PATH)/rodin.a
MONLIB = $(LIB_PATH)/motif1.a $(LIB_PATH)/motif.a
EDTLIB = $(LIB_PATH)/guiedt.a $(LIB_PATH)/gui.a $(LIB_PATH)/editor.a
OTHLIB = $(LIB_PATH)/reverse.a $(LIB_PATH)/interface.a $(LIB_PATH)/sdlevt.a $(LIB_PATH)/generic.a
CLSLIB = $(LIB_PATH)/anledt.a $(LIB_PATH)/clsedt.a $(LIB_PATH)/sdledt.a
ANIM = $(LIB_PATH)/dbglib.a

MLIB = -lm
 
GPPLIB = $(ANIM) $(CLSLIB) $(OTHLIB) $(EDTLIB) $(MONLIB) $(RODLIB) $(OAKLIB)
SYSLIB = $(GPPLIB) $(SYS_LIB_MOTIF) $(XLIB) $(MLIB)


.SUFFIXES: .C
.SUFFIXES: .exe
 
.C.o:
	$(CC) -c $(CFLAGS) $(INCOAK) $(INCSYS) $<
 
.o.exe:
	$(CC) $(CFLAGS) $< $(OBJECT) $(SYSLIB) -o $@
 
.C.exe:
	make $*.o
	make $@
 
 
target: $(MAIN).exe
	$(MAIN).exe
	echo make complete
 
$(MAIN).exe: $(OBJECT) $(MAIN).o
 
clean: makefile
	rm -f *.o; rm -f *.exe; rm -f *.int; rm -f *.tmp
	rm -f *.ixx; rm -f out.*; rm -f log; rm -f out; rm -f *.i
	rm -f *.cyi; rm -f core

 
# end of makefile 
