TOP = . ;

if $(OS) = MACOSX {
	IS_GAME = 1 ;
}
#GRAPHICS_USE_TEXTURE = 1 ;
GRAPHICS_USE_SHADER = 1 ;
SubInclude TOP Graphics ;
SubInclude TOP Basis ;

SubDir TOP ;

NAMES =
	plate_jam #main program
	live_plate #renderer for live plate performance
	Jam
	Plate
	Image
	mixer
;

Objects $(NAMES:S=.cpp) ;

ObjectC++Flags $(NAMES) : -O3 ;
GraphicsFlags $(NAMES) ;

EXECNAME = plate_jam ;

INFOPLIST = osx/Info.plist ;
ICNS = osx/Plate_Jam.icns ;

GraphicsLibs $(EXECNAME) ;

if $(OS) = NT {
	Resource icons.res : icons/icons.rc ;
	LinkResource dist/$(EXECNAME) : icons.res ;
}

Executable $(EXECNAME) : $(NAMES:S=$(SUFOBJ)) $(GRAPHICS_OBJECTS) $(BASIS_OBJECTS) ;

#SHOTTEXTURES =
#lo-fi.base.png lo-fi.add.png ;

#MkDirBulk dist$(SEP)textures$(SEP)shots : textures$(SEP)shots$(SEP)$(SHOTTEXTURES) ;

Datafile gentium.txf : Graphics$(SEP)fonts$(SEP)gentium.txf ;
Datafile plate.glsl : shaders$(SEP)plate.glsl ;
Datafile subpixel.glsl : shaders$(SEP)subpixel.glsl ;

IMAGES = 
	boxes.pgm
	chicken.pgm
	dots.pgm
	frown.pgm
	grad.pgm
	lines.pgm
	other_grad.pgm
	sig.pgm
	slur.pgm
	smile.pgm
	spiral.pgm
	spots.pgm
	stripe.pgm
;

Datafiles images : images/$(SEP)$(IMAGES) ;

Datafile README.txt : README.txt ;
