# This is an automatically generated file; please do not edit it manually.
# Instead, run makefile_builder.sh from the parent directory.
# It may require a little tweaking. (paths)

# Where is Ultima 7 installed
U7PATH:=C:/Ultima7

# Base of the exult source
SRC:=../..

srcdir:=.

UCCDIR:=$(SRC)
UCC:=$(UCCDIR)/ucc.exe

EXPACKDIR:=$(SRC)
EXPACK:=$(EXPACKDIR)/expack.exe

sifixesdir:=$(U7PATH)/silverseed/mods

USECODE_OBJECTS :=	\
	src/cutscenes/fawn_storm.uc	\
	src/cutscenes/fawn_trial.uc	\
	src/cutscenes/monitor_banquet.uc	\
	src/cutscenes/moonshade_banquet.uc	\
	src/cutscenes/wall_of_lights.uc	\
	src/header/constants.uc	\
	src/header/functions.uc	\
	src/header/si/si_externals.uc	\
	src/header/si/si_faces.uc	\
	src/header/si/si_gflags.uc	\
	src/header/si/si_npcs.uc	\
	src/header/si/si_shapes.uc	\
	src/header/si/si_sprites.uc	\
	src/header/si/si_structs.uc	\
	src/items/bucket_cure.uc	\
	src/items/fishingrod.uc	\
	src/items/hourglass.uc	\
	src/items/nightmare.uc	\
	src/items/pillar.uc	\
	src/items/potion.uc	\
	src/items/scroll.uc	\
	src/items/time_tellers.uc	\
	src/misc/draxinar_cloth_riddle.uc	\
	src/misc/draxinar_earrings_riddle.uc	\
	src/misc/egg_bane_holocaust.uc	\
	src/misc/egg_gorlab_swamp_sleep.uc	\
	src/misc/egg_gwani_attack.uc	\
	src/misc/egg_skullcrusher_automatons.uc	\
	src/misc/egg_starting_hints.uc	\
	src/misc/exchanged_item_list.uc	\
	src/misc/fawn_tower_cleanup.uc	\
	src/misc/gwani_cloak_check.uc	\
	src/misc/inn_keys.uc	\
	src/misc/is_obj_blocked.uc	\
	src/misc/list_field.uc	\
	src/misc/location_ids.uc	\
	src/misc/luther_return_shield.uc	\
	src/misc/resurrect.uc	\
	src/npcs/baiyanda.uc	\
	src/npcs/bwundiai.uc	\
	src/npcs/cantra.uc	\
	src/npcs/delin.uc	\
	src/npcs/dupre.uc	\
	src/npcs/edrin.uc	\
	src/npcs/frigidazzi.uc	\
	src/npcs/ghost.uc	\
	src/npcs/goblin_simon.uc	\
	src/npcs/gwenno.uc	\
	src/npcs/hound.uc	\
	src/npcs/iolo.uc	\
	src/npcs/kylista.uc	\
	src/npcs/mwaerno.uc	\
	src/npcs/myauri.uc	\
	src/npcs/neyobi.uc	\
	src/npcs/shamino.uc	\
	src/npcs/skullcrusher_automatons.uc	\
	src/npcs/spinebreaker_automatons.uc	\
	src/npcs/thoxa.uc	\
	src/spells/spells.uc	\
	src/usecode.uc

FACES_VGA_OBJECTS :=	\
	src/graphics/faces.in	\
	src/graphics/faces/317_smith_horse_by_rhona.shp

GUMPS_VGA_OBJECTS :=	\
	src/graphics/gumps.in	\
	src/graphics/gumps/magic_scroll_1st.shp	\
	src/graphics/gumps/magic_scroll_4th.shp	\
	src/graphics/gumps/magic_scroll_5th.shp	\
	src/graphics/gumps/magic_scroll_6th.shp	\
	src/graphics/gumps/magic_scroll_7th.shp	\
	src/graphics/gumps/magic_scroll_8th.shp	\
	src/graphics/gumps/spellbook_2.shp	\
	src/graphics/gumps/spellbook_3.shp	\
	src/graphics/gumps/spellbook_5.shp	\
	src/graphics/gumps/spellbook_6.shp	\
	src/graphics/gumps/spellbook_7.shp

MAINSHP_FLX_OBJECTS :=	\
	src/graphics/mainshp.in	\
	src/graphics/mainshp/title.shp

PAPERDOL_VGA_OBJECTS :=	\
	src/graphics/paperdol.in	\
	src/graphics/paperdol/152_moonsilk_stockings.shp	\
	src/graphics/paperdol/153_fishnet_stockings.shp

SHAPES_VGA_OBJECTS :=	\
	src/graphics/shapes.in	\
	src/graphics/shapes/sails.shp

SPRITES_VGA_OBJECTS :=	\
	src/graphics/sprites.in	\
	src/graphics/sprites/map_en.shp	\
	src/graphics/sprites/sprite_07_teleport_here.shp

CLEANFILES :=	\
	data/usecode	\
	data/faces.vga	\
	data/faces_vga.h	\
	data/gumps.vga	\
	data/gumps_vga.h	\
	data/mainshp.flx	\
	data/mainshp_flx.h	\
	data/paperdol.vga	\
	data/paperdol_vga.h	\
	data/shapes.vga	\
	data/shapes_vga.h	\
	data/sprites.vga	\
	data/sprites_vga.h

all: data/usecode data/faces.vga data/gumps.vga data/mainshp.flx data/paperdol.vga data/shapes.vga data/sprites.vga

install: all
	mkdir -p $(sifixesdir)
	cp sifixes.cfg $(sifixesdir)/sifixes.cfg
	mkdir -p $(sifixesdir)/sifixes/data
	cp data/usecode $(sifixesdir)/sifixes/data/usecode
	cp data/faces.vga $(sifixesdir)/sifixes/data/faces.vga
	cp data/gumps.vga $(sifixesdir)/sifixes/data/gumps.vga
	cp data/mainshp.flx $(sifixesdir)/sifixes/data/mainshp.flx
	cp data/paperdol.vga $(sifixesdir)/sifixes/data/paperdol.vga
	cp data/shapes.vga $(sifixesdir)/sifixes/data/shapes.vga
	cp data/sprites.vga $(sifixesdir)/sifixes/data/sprites.vga
	cp data/initgame.dat $(sifixesdir)/sifixes/data/initgame.dat
	cp Readme.txt $(sifixesdir)/sifixes/Readme.txt
	cp sifixes.ico $(sifixesdir)/sifixes/sifixes.ico
	cp sifixes.png $(sifixesdir)/sifixes/sifixes.png
	cp ./../../COPYING $(sifixesdir)/sifixes/License.txt

uninstall:
	rm -f $(sifixesdir)/sifixes.cfg
	rm -rf $(sifixesdir)/sifixes

$(EXPACK):
	+(cd $(EXPACKDIR);$(MAKE) -f Makefile.mingw expack.exe)

$(UCC):
	+(cd $(UCCDIR);$(MAKE) -f Makefile.mingw ucc.exe)


data/usecode: $(UCC) $(USECODE_OBJECTS)
	$(UCC) -I src -o data/usecode src/usecode.uc

data/faces.vga: $(EXPACK) $(FACES_VGA_OBJECTS)
	$(EXPACK) -i $(srcdir)/src/graphics/faces.in

data/gumps.vga: $(EXPACK) $(GUMPS_VGA_OBJECTS)
	$(EXPACK) -i $(srcdir)/src/graphics/gumps.in

data/mainshp.flx: $(EXPACK) $(MAINSHP_FLX_OBJECTS)
	$(EXPACK) -i $(srcdir)/src/graphics/mainshp.in

data/paperdol.vga: $(EXPACK) $(PAPERDOL_VGA_OBJECTS)
	$(EXPACK) -i $(srcdir)/src/graphics/paperdol.in

data/shapes.vga: $(EXPACK) $(SHAPES_VGA_OBJECTS)
	$(EXPACK) -i $(srcdir)/src/graphics/shapes.in

data/sprites.vga: $(EXPACK) $(SPRITES_VGA_OBJECTS)
	$(EXPACK) -i $(srcdir)/src/graphics/sprites.in

clean:
	rm -f $(CLEANFILES)

