XCOMM
XCOMM place to build the InterViews library
XCOMM

#ifdef InObjectCodeDir

/* Additional defines:
 * - Instrumented: to get instrumented version
 */
/* #define Instrumented */
#define build_nls

VERSION = 1.1
LIB	= IICMViews


/*
APP_CCFLAGS = -g -Wall -Wimplicit -Wreturn-type -Wunused -Wformat -Wuninitialized
*/

#if defined(SunArchitecture) && OSMajorVersion >= 5
APP_CCFLAGS = -g
#endif

HG_START_PATH = $(ROOTDIR)/src/harmony/iicmviews

INTERVIEWS = $(HG_START_PATH)/InterViews
IV_X11	   = $(HG_START_PATH)/IV-X11
TIFF	   = $(HG_START_PATH)/TIFF
NLS	   = $(HG_START_PATH)/NLS

SRCS	   = \
	$(INTERVIEWS)$(SLASH)*.$(CCSUFFIX)\
	$(IV_X11)$(SLASH)*.$(CCSUFFIX)\
	$(NLS)$(SLASH)*.$(CCSUFFIX)
	/* TIFF not included because it cannot use the same flags */

/* I do not know if this is the right place for the include path of X11 header
 * files, but it works... -- bheide 260895 */
APP_CCINCLUDES = -I$(HG_START_PATH)/include  -I/usr/SpaceWare/sdk/SLIM/include

#ifdef Instrumented
APP_CCDEFINES = -DINSTRUMENTED
#endif

/* KitFlags was in local.def -- bheide180895 */
/*
 * Default customization of kits.
 * Possible flags to define:
 *  sgi_motif_kit (SMFKit), motif_kit (MFKit),
 *  openlook_kit (OLKit), bw_kit (MonoKit)
 */
#ifndef KitFlags
#define KitFlags \
-Dmotif_kit \
-Dsgi_motif_kit \
-Dopenlook_kit \
-Dbw_kit \
-Ddefault_kit=SMFKit
#endif


KIT_CCFLAGS = KitFlags

DEPEND_CCFLAGS = DependCCFlags $(KIT_CCFLAGS) $(GL_CCFLAGS)

SH_OBJS = $(OBJS)

MakeLibrary($(LIB),$(VERSION))

#ifndef MakeSharedLibrary
#ifndef HaveShared
#define MakeSharedLibrary(name,rev)
#else
#define MakeSharedLibrary(name,rev)					@@\
NormalSharedLibraryTarget(name,rev,NullParameter,$(SH_OBJS))		@@\
InstallSharedLibrary(name,rev,$(HGSHAREDLIBDIR))			@@\
DependSharedTarget()
#endif
#endif

/*MakeSharedLibrary($(LIB),$(VERSION))*/

#define InterViewsObj(file) InterViewsObjFlags(file,NullParameter)
#define InterViewsObjFlags(file,f) MakeObjectRule(file,$(INTERVIEWS)/file,f)

InterViewsObj(action)
InterViewsObj(adjust)
InterViewsObj(aggr)
InterViewsObj(align)
InterViewsObjFlags(alloctbl,$(OPTIMIZE_CCFLAGS))
InterViewsObjFlags(arrcomp,$(OPTIMIZE_CCFLAGS))
InterViewsObj(background)
InterViewsObj(bevel)
InterViewsObj(border)
InterViewsObjFlags(box,$(OPTIMIZE_CCFLAGS))
InterViewsObj(browser)
InterViewsObj(button)
InterViewsObj(character)
InterViewsObjFlags(composition,$(OPTIMIZE_CCFLAGS))
InterViewsObj(compositor)
InterViewsObj(debug)
InterViewsObj(deck)
InterViewsObjFlags(dialogs,$(KIT_CCFLAGS))
InterViewsObj(fbrowser)
InterViewsObj(geometry)
InterViewsObj(glyph)
InterViewsObj(group)
InterViewsObj(handler)
InterViewsObj(hit)
InterViewsObj(image)
InterViewsObj(input)
InterViewsObjFlags(kit,$(KIT_CCFLAGS))
InterViewsObj(label)
InterViewsObjFlags(layout,$(OPTIMIZE_CCFLAGS))
InterViewsObj(lrmarker)
InterViewsObj(menu)
InterViewsObj(mf_kit)
InterViewsObj(monoglyph)
InterViewsObj(mono_kit)
InterViewsObj(observe)
InterViewsObjFlags(ol_kit,$(OPTIMIZE_CCFLAGS))
InterViewsObj(page)
InterViewsObj(patch)
InterViewsObjFlags(place,$(OPTIMIZE_CCFLAGS))
InterViewsObj(polyglyph)
InterViewsObj(printer)
InterViewsObjFlags(psfont,-Dps_metrics_dir='"$(PSFONTDIR)"')
InterViewsObj(regexp)
InterViewsObj(resource)
InterViewsObj(rule)
InterViewsObjFlags(scrbox,$(OPTIMIZE_CCFLAGS))
InterViewsObj(session)
InterViewsObj(shadow)
InterViewsObjFlags(simpcomp,$(OPTIMIZE_CCFLAGS))
InterViewsObj(slider)
InterViewsObjFlags(smf_kit,$(OPTIMIZE_CCFLAGS))
InterViewsObj(stencil)
InterViewsObj(stepper)
InterViewsObjFlags(style,$(OPTIMIZE_CCFLAGS))
InterViewsObj(superpose)
InterViewsObjFlags(transformer,$(OPTIMIZE_CCFLAGS))
InterViewsObj(target)
InterViewsObj(telltale)
InterViewsObjFlags(texcomp,$(OPTIMIZE_CCFLAGS))
InterViewsObjFlags(tile,$(OPTIMIZE_CCFLAGS))
InterViewsObjFlags(tiff,$(OPTIMIZE_CCFLAGS) -D$(ARCH) -I$(SRC)/..)
InterViewsObj(tformsetter)
InterViewsObj(wlabel)
InterViewsObj(xymarker)
#ifdef Instrumented
InterViewsObj(logging)
#endif


#define InterViewsSharedObj(file) InterViewsSharedObjFlags(file,NullParameter)
#define InterViewsSharedObjFlags(file,f) MakeSharedObjectRule(file,$(INTERVIEWS)/file,f)

InterViewsSharedObj(action)
InterViewsSharedObj(adjust)
InterViewsSharedObj(aggr)
InterViewsSharedObj(align)
InterViewsSharedObjFlags(alloctbl,$(OPTIMIZE_CCFLAGS))
InterViewsSharedObjFlags(arrcomp,$(OPTIMIZE_CCFLAGS))
InterViewsSharedObj(background)
InterViewsSharedObj(bevel)
InterViewsSharedObj(border)
InterViewsSharedObjFlags(box,$(OPTIMIZE_CCFLAGS))
InterViewsSharedObj(browser)
InterViewsSharedObj(button)
InterViewsSharedObj(character)
InterViewsSharedObjFlags(composition,$(OPTIMIZE_CCFLAGS))
InterViewsSharedObj(compositor)
InterViewsSharedObj(debug)
InterViewsSharedObj(deck)
InterViewsSharedObjFlags(dialogs,$(KIT_CCFLAGS))
InterViewsSharedObj(fbrowser)
InterViewsSharedObj(geometry)
InterViewsSharedObj(glyph)
InterViewsSharedObj(group)
InterViewsSharedObj(handler)
InterViewsSharedObj(hit)
InterViewsSharedObj(image)
InterViewsSharedObj(input)
InterViewsSharedObjFlags(kit,$(KIT_CCFLAGS))
InterViewsSharedObj(label)
InterViewsSharedObjFlags(layout,$(OPTIMIZE_CCFLAGS))
InterViewsSharedObj(lrmarker)
InterViewsSharedObj(menu)
InterViewsSharedObj(mf_kit)
InterViewsSharedObj(monoglyph)
InterViewsSharedObj(mono_kit)
InterViewsSharedObj(observe)
InterViewsSharedObjFlags(ol_kit,$(OPTIMIZE_CCFLAGS))
InterViewsSharedObj(page)
InterViewsSharedObj(patch)
InterViewsSharedObjFlags(place,$(OPTIMIZE_CCFLAGS))
InterViewsSharedObj(polyglyph)
InterViewsSharedObj(printer)
InterViewsSharedObjFlags(psfont,-Dps_metrics_dir='"$(PSFONTDIR)"')
InterViewsSharedObj(regexp)
InterViewsSharedObj(resource)
InterViewsSharedObj(rule)
InterViewsSharedObjFlags(scrbox,$(OPTIMIZE_CCFLAGS))
InterViewsSharedObj(session)
InterViewsSharedObj(shadow)
InterViewsSharedObjFlags(simpcomp,$(OPTIMIZE_CCFLAGS))
InterViewsSharedObj(slider)
InterViewsSharedObjFlags(smf_kit,$(OPTIMIZE_CCFLAGS))
InterViewsSharedObj(stencil)
InterViewsSharedObj(stepper)
InterViewsSharedObjFlags(style,$(OPTIMIZE_CCFLAGS))
InterViewsSharedObj(superpose)
InterViewsSharedObjFlags(transformer,$(OPTIMIZE_CCFLAGS))
InterViewsSharedObj(target)
InterViewsSharedObj(telltale)
InterViewsSharedObjFlags(texcomp,$(OPTIMIZE_CCFLAGS))
InterViewsSharedObjFlags(tile,$(OPTIMIZE_CCFLAGS))
InterViewsSharedObjFlags(tiff,$(OPTIMIZE_CCFLAGS) -D$(ARCH) -I$(SRC)/..)
InterViewsSharedObj(tformsetter)
InterViewsSharedObj(wlabel)
InterViewsSharedObj(xymarker)
#ifdef Instrumented
InterViewsSharedObj(logging)
#endif


#ifdef build_nls
APP_CCDEFINES := $(APP_CCDEFINES) -Div_nls
#endif

#define NLSObj(file) NLSObjFlags(file,NullParameter)
#define NLSObjFlags(file,f) MakeObjectRule(file,$(NLS)/file,f)

NLSObjFlags(charset,$(OPTIMIZE_CCFLAGS))
NLSObjFlags(codeset,$(OPTIMIZE_CCFLAGS))
NLSObjFlags(locale,$(OPTIMIZE_CCFLAGS))
NLSObjFlags(nlsfile,$(OPTIMIZE_CCFLAGS) $(LIBPATHS))
NLSObjFlags(wcharbuf,$(OPTIMIZE_CCFLAGS))
NLSObjFlags(wregexp,$(OPTIMIZE_CCFLAGS))
NLSObjFlags(wstring,$(OPTIMIZE_CCFLAGS))


#define NLSSharedObj(file) NLSSharedObjFlags(file,NullParameter)
#define NLSSharedObjFlags(file,f) MakeSharedObjectRule(file,$(NLS)/file,f)

NLSSharedObjFlags(charset,$(OPTIMIZE_CCFLAGS))
NLSSharedObjFlags(codeset,$(OPTIMIZE_CCFLAGS))
NLSSharedObjFlags(locale,$(OPTIMIZE_CCFLAGS))
NLSSharedObjFlags(nlsfile,$(OPTIMIZE_CCFLAGS) $(LIBPATHS))
NLSSharedObjFlags(wcharbuf,$(OPTIMIZE_CCFLAGS))
NLSSharedObjFlags(wregexp,$(OPTIMIZE_CCFLAGS))
NLSSharedObjFlags(wstring,$(OPTIMIZE_CCFLAGS))


#define IV_X11Obj(file) IV_X11ObjFlags(file,NullParameter)
#define IV_X11ObjFlags(file,f) MakeObjectRule(file,$(IV_X11)/file,f)

#if BuildGLContext
GL_CCFLAGS = -DGL
IV_X11ObjFlags(glcontext,$(GL_CCFLAGS))
#endif
IV_X11Obj(xatom)
IV_X11ObjFlags(xbitmap,$(OPTIMIZE_CCFLAGS))
IV_X11Obj(xbrush)
IV_X11ObjFlags(xcanvas,$(OPTIMIZE_CCFLAGS))
IV_X11Obj(xcolor)
IV_X11Obj(xcursor)
IV_X11Obj(xdrag)
IV_X11Obj(xevent)
IV_X11ObjFlags(xfont,$(OPTIMIZE_CCFLAGS))
IV_X11Obj(xfontset)
IV_X11Obj(ximp)
IV_X11Obj(xraster)
IV_X11Obj(xreqerr)
IV_X11Obj(xselection)
IV_X11ObjFlags(xwindow,$(OPTIMIZE_CCFLAGS))
IV_X11Obj(harcolors)


#define IV_X11SharedObj(file) IV_X11SharedObjFlags(file,NullParameter)
#define IV_X11SharedObjFlags(file,f) MakeSharedObjectRule(file,$(IV_X11)/file,f)

#if BuildGLContext
IV_X11SharedObjFlags(glcontext,$(GL_CCFLAGS))
#endif
IV_X11SharedObj(xatom)
IV_X11SharedObjFlags(xbitmap,$(OPTIMIZE_CCFLAGS))
IV_X11SharedObj(xbrush)
IV_X11SharedObjFlags(xcanvas,$(OPTIMIZE_CCFLAGS))
IV_X11SharedObj(xcolor)
IV_X11SharedObj(xcursor)
IV_X11SharedObj(xdrag)
IV_X11SharedObj(xevent)
IV_X11SharedObjFlags(xfont,$(OPTIMIZE_CCFLAGS))
IV_X11SharedObj(xfontset)
IV_X11SharedObj(ximp)
IV_X11SharedObj(xraster)
IV_X11SharedObj(xreqerr)
IV_X11SharedObj(xselection)
IV_X11SharedObjFlags(xwindow,$(OPTIMIZE_CCFLAGS))
IV_X11SharedObj(harcolors)

XCOMM
XCOMM TIFFObjFlags(tif_compress,$(TIFF_CPRESS_CDEFINES))
XCOMM


#include <TIFF.def>

#define TIFFObj(file) TIFFObjFlags(file,NullParameter)
#define TIFFObjFlags(file,f)\
MakeTIFFCObjectRule(file,$(TIFF)/file,$(TIFF_OPTIMIZE_CFLAGS) f)

TIFFObjFlags(tif_fax3,-I.)
TIFFObj(tif_fax4)
TIFFObj(tif_aux)
TIFFObj(tif_ccittrle)
TIFFObj(tif_close)
TIFFObj(tif_compress)
TIFFObj(tif_dir)
TIFFObj(tif_dirinfo)
TIFFObj(tif_dirread)
TIFFObj(tif_dirwrite)
TIFFObj(tif_dumpmode)
TIFFObj(tif_error)
TIFFObj(tif_getimage)
TIFFObj(tif_jpeg)
TIFFObj(tif_flush)
TIFFObj(tif_lzw)
TIFFObj(tif_next)
TIFFObj(tif_open)
TIFFObj(tif_packbits)
TIFFObj(tif_print)
TIFFObj(tif_read)
TIFFObj(tif_swab)
TIFFObj(tif_strip)
TIFFObj(tif_thunder)
TIFFObj(tif_tile)
TIFFObjFlags(tif_unix,-D$(ARCH))
TIFFObj(tif_warning)
TIFFObj(tif_write)
TIFFObj(tif_version)

#define TIFFSharedObj(file) TIFFSharedObjFlags(file,NullParameter)
#define TIFFSharedObjFlags(file,f)\
MakeTIFFCSharedObjectRule(file,$(TIFF)/file,$(TIFF_OPTIMIZE_CFLAGS) f)

TIFFSharedObjFlags(tif_fax3,-I.)
TIFFSharedObj(tif_fax4)
TIFFSharedObj(tif_aux)
TIFFSharedObj(tif_ccittrle)
TIFFSharedObj(tif_close)
TIFFSharedObj(tif_compress)
TIFFSharedObj(tif_dir)
TIFFSharedObj(tif_dirinfo)
TIFFSharedObj(tif_dirread)
TIFFSharedObj(tif_dirwrite)
TIFFSharedObj(tif_dumpmode)
TIFFSharedObj(tif_error)
TIFFSharedObj(tif_getimage)
TIFFSharedObj(tif_jpeg)
TIFFSharedObj(tif_flush)
TIFFSharedObj(tif_lzw)
TIFFSharedObj(tif_next)
TIFFSharedObj(tif_open)
TIFFSharedObj(tif_packbits)
TIFFSharedObj(tif_print)
TIFFSharedObj(tif_read)
TIFFSharedObj(tif_swab)
TIFFSharedObj(tif_strip)
TIFFSharedObj(tif_thunder)
TIFFSharedObj(tif_tile)
TIFFSharedObjFlags(tif_unix,-D$(ARCH))
TIFFSharedObj(tif_warning)
TIFFSharedObj(tif_write)
TIFFSharedObj(tif_version)

tif_fax3.o: g3states.h
shared/tif_fax3.o: g3states.h
g3states.h: $(TIFF)/mkg3states.c $(TIFF)/t4.h
	@$(RM) mkg3states
	$(TIFF_CDRIVER) $(TIFF_CLDFLAGS) -o mkg3states $(TIFF)/mkg3states.c
	./mkg3states > g3states.h

clean::
	$(RM) mkg3states g3states.h


#else

MakeInObjectCodeDir()

#endif
