#
# Flags to compile the IRIT solid modeller using DJGCC on the IBM PC.
#
#					Gershon Elber, Dec 1991
#

#
# make file to use. I am using regular Borland's maker (from Borland 3.0).
# This maker is the same as previous Borland compilers make (uprotected
# mode make). In 3.0 make is protected and cause gcc to crash.
# Note you may need to change the include statements in the subdirectory
# makefiles if other make is to be used.
#
MAKE = maker

BASE_DISK = d
BASE_DJGPP_DIR  = $(BASE_DISK):/dos/djgpp
BASE_DJGPP_DIR2 = $(BASE_DISK):\dos\djgpp
BASE_IRIT_DIR   = $(BASE_DISK):/dos/irit
BASE_IRIT_DIR2  = $(BASE_DISK):\dos\irit

#
#
# All libraries created will be installed into the LIB_DIR directory.
#
LIB_DIR     = $(BASE_DJGPP_DIR)/mylib
LIB_DIR_DOS = $(BASE_DJGPP_DIR2)\mylib

#
# All includes files associated with the installed libraries will be
# installed into the INC_DIR directory.
#
INC_DIR     = $(BASE_DJGPP_DIR)/myinclud
INC_DIR_DOS = $(BASE_DJGPP_DIR2)\myinclud

#
# All binaries created will be installed into the BIN_DIR directory.
#
BIN_DIR = $(BASE_IRIT_DIR)/bin
BIN_DIR_DOS = $(BASE_IRIT_DIR2)\bin

#
# Location of object file to resolve circularities in libraries.
#
CIRCLINK = $(BASE_DISK):/dos/irit/circlink/circlink.obj

#
# Flags using DJ 1.11 (gcc 2.57) for the IBM PC and its graphics drivers
#
CC = gcc
DFLAGS = -U__MSDOS__ -DGETCWD -DDJGCC
# CFLAGS = -O2 $(DFLAGS)
CFLAGS = $(DFLAGS)
MORELIBS = -lintr -lgr -lpc
MOREOBJS = dosgraph.o

#
# Default rule for compilation.
#
.c.obj:
	$(CC) $(CFLAGS) -I. -I$(INC_DIR) -o $*.obj -c $<
.cc.obj:
	$(CC) $(CFLAGS) -I. -I$(INC_DIR) -o $*.obj -c $<

#
# All libraries.
#
LIBS = $(CIRCLINK) -L$(LIB_DIR) \
	-luser -lbool -lgeom -lprsr -ltrim -ltriv -ltrng -lsymb \
	-lcagd -lmisc -lxtra -lintr -lgif
