# # This makeflag is the main makefile setup of the IRIT solid modeller and its # auxilary tools, under CYGWIN and GNU COMPILER/MAKE. Copy this file to # makeflag.unx ("cp makeflag.cygwin makeflag.unx") and invoke make on # makefile.unx # # Gershon Elber, Nov. 2003 # # The SRC_DIR variables below MUST have ABSOLUTE path. Since this file # is sourced from several directories relative path specification will # be simple wrong. # SRC_DIR = /cygdriver/c/irit/irit # # All libraries created will be installed into the LIB_DIR directory. # LIB_DIR = ../lib # # All includes files associated with the installed libraries will be # installed into the INC_DIR directory. # INC_DIR = ../include # # All binaries created will be installed into the BIN_DIR directory. # BIN_DIR = ../bin # # Invoke this make file as 'make CFG=Rel makefile.unx' for release mode: # ifeq ($(CFG), Rel) IRITOBJPF = IRITLIBPF = IRITEXEPF = .exe STRIPEXE = strip else IRITOBJPF = D IRITLIBPF = D IRITEXEPF = D.exe STRIPEXE = ls endif # # Location of object file to resolve circularities in libraries. # CIRCLINK = ../circlink/circlink.o$(IRITOBJPF) # # Support for GZIP image read/write using the gzip toolkit library. # You can ftp it from http://www.gzip.org/zlib/ # # GZIP = /cygdriver/c/zlib # GZIP_INC = -I$(GZIP) # GZIP_LIB = $(GZIP)/zlib.lib # GZIP_FLAGS = -DHAVE_GZIP_LIB # # Support for compressed binary files. # This option also requires -DHAVE_GZIP_LIB. # # IPC_COMP = -DIPC_BIN_COMPRESSION # # The scan converter (irender) needs the Utah Raster Toolkit (URT) library # to read/write image data. You can ftp it in cs.utah.edu. # # Make these empty if you would like to give up on irender's compilation. # #URT = /b/d2/gershon/urt/onyx64 #URT_INC = -I$(URT)/include #URT_LIB = -L$(URT)/lib -lrle #URT_FLAGS = -DHAVE_URT_RLE -DURT_OLD_COMPAT # # Support for GIF image read/write using the giflib toolkit library. # You can ftp it from http://catb.org/~esr/giflib/doc/gif_lib.html # #GIF = /b/d2/gershon/gif_lib #GIF_INC = -I$(GIF)/lib #GIF_LIB = $(GIF)/onyx64/lib/libgif.a #GIF_FLAGS = -DHAVE_GIF_LIB # # If you would like to use Mesa emulation of Open GL and compile Open GL # code using it (see http://www.ssec.wisc.edu/~brianp/Mesa.html for info # on Mesa), define the following: # # MESA_INC = -I/mach/emc2-32/isl/gershon/c/mesa/MesaLib-2.4/include -D__MESA__ -D__OPENGL__ # MESA_LIB = -L/mach/emc2-32/isl/gershon/c/mesa/MesaLib-2.4/lib -lGLU -lGL # # Support of (shared) libraries. You will need to set the proper suffix # of the libraries (LIB_SUFFIX) and the proper method to create a (shared) # library (LIB_MAKE). LIB_RAN is optional to optimize the archive (ranlib). # Remember you will have to update the LD_LIBRARY_PATH environment variable. # # Default is no shared libraries: # LIB_SUFFIX = a LIB_MAKE = ar rcv LIB_RAN = ranlib # # Uncomment the correct set of variables to be used or modify it for # your system. # # -D flags: # # -D__GL__ - if your system supports gl graphics library (SGI 4d & IBM R6000). # # -D__X11__ - if your system supports X11. Only one of __GL__ or __X11__ should # be used. # # Emulation to the following function are available by defining the # following. Look at misc_lib/xgeneral.c/h for implementation. # -DGETCWD - if getcwd is not defined in this system. # -DSTRSTR - if strstr is not defined in this system. # -DSTRDUP - if strdup is not defined in this system. # -DSTRICMP - if niether strcasecmp nor stricmp are defined in this system. # # -DTIMES - if times is defined in your system, otherwise uses time. # # -DRAND - if the (s)rand random number generator exists. # -DRAND48 - ?rand48 random number generators exists. # If non of RAND or RAND48 are defined, (s)random is used. # # Unfortunately, there is no one Unix function to do subseconds' sleep. # -DUSLEEP - if usleep is defined in the system. # -DSGINAP - on sgi systems instead of usleep. # -DUSLEEP_SELECT - do the usleep using the 'select' unix call. # -DITIMERVAL - when all the above fails, try this. # # -DNO_VOID_PTR - if your C compiler does not support (void *). # # -DUSE_VARARGS - if your system does not have stdarg.h and have the old # varargs.h. # # -DNO_CONCAT_STR - if 'char *p = "This is" "one string";' is illegal. # # -DGRAPDRVS - any combination of of 'xgldrvs', 'xgladap', 'x11drvs', etc. # # -DMAKE_REAL_FLOAT - force real number to be float and not double. # Expect problems as it is not really tested. # # -DURT_INC and -DURT_LIB - library and include of the utah raster toolkit. # -DHAVE_URT_RLE - if IRIT can use the URT RLE package. That is URT_INC/ # URT_LIB are properly set. # # -DGIF_INC and -DGIF_LIB - library and include of the giflib toolkit. # -DHAVE_GIF_LIB - if IRIT can use the GIFLIB package. That is GIF_INC/ # GIF_LIB are properly set. # # -DPNG_INC and -DPNG_LIB - library and include of the pnglib toolkit. # -DHAVE_PNG_LIB - if IRIT can use the PNGLIB package. That is PNG_INC/ # PNG_LIB are properly set. # The png lib also requires zlib! # # -DGZIP_INC and -DGZIP_LIB - library and include of the giflib toolkit. # -DHAVE_GZIP_LIB - if IRIT can use the GZIPLIB package. That is GZIP_INC/ # GZIP_LIB are properly set. # # -DIPC_BIN_COMPRESSION - if support for binary compressed files is to # to be provided (*.icd files). # This option also requires -DHAVE_GZIP_LIB. # # -DIRIT_QUIET_STRINGS - minimal print outs. # # Other, possibly useful defines (for c code development): # # -DDEBUG - for some debugging functions in the code (that can be invoked # from a debugger). # # -DDEBUG_IRIT_MALLOC - for extensive malloc debugging facility. See # misc_lib/imalloc.c and the idynmem irit interpreter function. # # # Flags for x86 using gcc/X11R6 # CC = gcc DFLAGS = -D__CYGWIN__ -D__UNIX__ -DX11R6 -D__X11__ -DUSLEEP -I/usr/include -I/usr/X11R6/include $(IPC_COMP) ifeq ($(CFG), Rel) CFLAGS = -O2 -pipe -m486 -fomit-frame-pointer $(DFLAGS) else CFLAGS = -g -DDEBUG $(DFLAGS) endif MORELIBS = -lc GRAPX11LIBS = -L/usr/X11R6/lib -lX11 -lSM -lICE GRAPXMTLIBS = -L/usr/X11R6/lib -lXm -lXt -lX11 -lSM -lICE GRAPOGLLIBS = -lGLU -lGL $(GRAPXMTLIBS) GRAPDRVS = nuldrvs$(IRITEXEPF) x11drvs$(IRITEXEPF) xmtdrvs$(IRITEXEPF) xogldrvs$(IRITEXEPF) # # For shared libraries add: # #LIB_SUFFIX = so #LIB_MAKE = gcc -shared -o #LIB_RAN = echo # # Static libraries # LIB_SUFFIX = a # # Default rule for compilation. # %.o$(IRITOBJPF): %.c $(CC) $(CFLAGS) $(URT_FLAGS) $(GIF_FLAGS) $(PNG_FLAGS) $(GZIP_FLAGS) $(MORE_FLAGS) -I. -I$(INC_DIR) $(URT_INC) $(GIF_INC) $(PNG_INC) $(GZIP_INC) $(MORE_INC) -o $@ -c $< # # All libraries. # LIBS = $(CIRCLINK) $(IRIT_MORE_LIB) \ $(LIB_DIR)/libIritUser$(IRITLIBPF).$(LIB_SUFFIX) \ $(LIB_DIR)/libIritRndr$(IRITLIBPF).$(LIB_SUFFIX) \ $(LIB_DIR)/libIritBool$(IRITLIBPF).$(LIB_SUFFIX) \ $(LIB_DIR)/libIritPrsr$(IRITLIBPF).$(LIB_SUFFIX) \ $(LIB_DIR)/libIritMdl$(IRITLIBPF).$(LIB_SUFFIX) \ $(LIB_DIR)/libIritMvar$(IRITLIBPF).$(LIB_SUFFIX) \ $(LIB_DIR)/libIritTrim$(IRITLIBPF).$(LIB_SUFFIX) \ $(LIB_DIR)/libIritTriv$(IRITLIBPF).$(LIB_SUFFIX) \ $(LIB_DIR)/libIritTrng$(IRITLIBPF).$(LIB_SUFFIX) \ $(LIB_DIR)/libIritSymb$(IRITLIBPF).$(LIB_SUFFIX) \ $(LIB_DIR)/libIritCagd$(IRITLIBPF).$(LIB_SUFFIX) \ $(LIB_DIR)/libIritGeom$(IRITLIBPF).$(LIB_SUFFIX) \ $(LIB_DIR)/libIritMisc$(IRITLIBPF).$(LIB_SUFFIX) \ $(LIB_DIR)/libIritXtra$(IRITLIBPF).$(LIB_SUFFIX) \ $(URT_LIB) $(GIF_LIB) $(PNG_LIB) $(GZIP_LIB)