#************************************************************
#
#  makefile for SGI/Irix
#
#************************************************************
#
#
.SUFFIXES : .cpp .o
#
#************************************************************
#
# library and include path names
#
#************************************************************
#
LIBBASE    = ./lib
LIBINCLUDE = ./include
#
#************************************************************
#
# c++ source files
#
#************************************************************
#
CCFILES  = main.cpp \
           CThread.cpp \
	   CSuperThread.cpp \
	   CFractThread.cpp \
           CFraktBitmap.cpp \
           CFractBatch.cpp \
           CPicWriter.cpp \
           $(LIBBASE)/CFileIO.cpp \
           $(LIBBASE)/CGraflib.cpp \
           $(LIBBASE)/CGraflibTga.cpp \
           $(LIBBASE)/CGraflibRaw.cpp \
           $(LIBBASE)/CPixel24.cpp \
           $(LIBBASE)/CStringTool.cpp \
           $(LIBBASE)/CDatabase3.cpp \
           $(NULL)

#
#************************************************************
#
# library files
#
#************************************************************
#
#
#************************************************************
#
# C++ flags
#
# -c  = compile only
# -O2 = optimize level 2
# -s  = remove symboltables
#
#************************************************************
#
# WDONT = Warings I dont want
#
#WDONT = -woff 3970,3968
#SGIFLAGS = -64 -mips4
CCFLAGS  = -O2 -I$(LIBINCLUDE) -L$(LIBBASE)

#************************************************************
#
# Rule for making .o-file from .cpp-file
#
# $@ = Name of the target (.o)
# $< = Name of dependency (.cpp)
#
#************************************************************

.cpp.o:
	g++ -c $(CCFLAGS) -o$@ $<

#************************************************************
#
# List of object-files
#
#************************************************************

CCOBJECTS = $(CCFILES:.cpp=.o)

#************************************************************
#
# Name of target
#
#************************************************************

TARGET  = fractbatch

#************************************************************
#
# Rule for default-target
#
#************************************************************

default: $(TARGET)

#************************************************************
#
# Rule for clean-up
#
#************************************************************

clean:
	rm -f *.o
	rm -f $(LIBBASE)/*.o
	rm -rf ii_files
	rm -rf $(LIBBASE)/ii_files

#************************************************************
#
# Rule for creating target from objects
#
#************************************************************

$(TARGET): $(CCOBJECTS) makefile
	g++ -o $(TARGET) $(CCFLAGS) $(CCOBJECTS) -lm -lpthread

