# Build Engine dependencies
#
$(SRC)/a-c.$o: $(SRC)/a-c.c $(SRC)/a.h
$(SRC)/a.$o: $(SRC)/a.$(asm)
$(SRC)/baselayer.$o: $(SRC)/baselayer.c $(INC)/compat.h $(INC)/baselayer.h $(INC)/build.h $(INC)/osd.h
$(SRC)/build.$o: $(SRC)/build.c $(INC)/build.h $(INC)/pragmas.h $(INC)/compat.h $(INC)/baselayer.h $(INC)/editor.h
$(SRC)/cache1d.$o: $(SRC)/cache1d.c $(INC)/compat.h $(INC)/cache1d.h $(INC)/pragmas.h $(INC)/baselayer.h
$(SRC)/compat.$o: $(SRC)/compat.c $(INC)/compat.h
$(SRC)/config.$o: $(SRC)/config.c $(INC)/compat.h $(INC)/osd.h $(INC)/editor.h
$(SRC)/crc32.$o: $(SRC)/crc32.c $(INC)/crc32.h
$(SRC)/defs.$o: $(SRC)/defs.c $(INC)/build.h $(INC)/baselayer.h $(INC)/scriptfile.h $(INC)/compat.h
$(SRC)/engine.$o: $(SRC)/engine.c $(INC)/compat.h $(INC)/build.h $(INC)/pragmas.h $(INC)/cache1d.h $(SRC)/a.h $(INC)/osd.h $(INC)/baselayer.h $(SRC)/engine_priv.h $(SRC)/polymost_priv.h $(SRC)/hightile_priv.h $(SRC)/mdsprite_priv.h
$(SRC)/polymost.$o: $(SRC)/polymost.c $(INC)/compat.h $(INC)/build.h $(INC)/glbuild.h $(INC)/pragmas.h $(INC)/baselayer.h $(INC)/osd.h $(SRC)/engine_priv.h $(SRC)/polymost_priv.h $(SRC)/hightile_priv.h $(SRC)/polymosttex_priv.h $(SRC)/polymosttexcache.h $(SRC)/mdsprite_priv.h
$(SRC)/polymosttex.$o: $(SRC)/polymosttex.c $(INC)/compat.h $(INC)/baselayer.h $(INC)/build.h $(INC)/glbuild.h $(SRC)/kplib.h $(INC)/cache1d.h $(INC)/pragmas.h $(SRC)/engine_priv.h $(SRC)/polymost_priv.h $(SRC)/hightile_priv.h $(SRC)/polymosttex_priv.h $(SRC)/polymosttexcache.h
$(SRC)/polymosttex-squish.$o: $(SRC)/polymosttex-squish.cc $(LIBSQUISH)/squish.h $(INC)/glbuild.h $(SRC)/polymost_priv.h
$(SRC)/polymosttexcache.$o: $(SRC)/polymosttexcache.c $(SRC)/polymosttexcache.h $(INC)/compat.h $(INC)/baselayer.h $(INC)/glbuild.h $(INC)/build.h $(SRC)/hightile_priv.h $(SRC)/polymosttex_priv.h
$(SRC)/hightile.$o: $(SRC)/hightile.c $(SRC)/kplib.h $(SRC)/hightile_priv.h
$(SRC)/mdsprite.$o: $(SRC)/mdsprite.c $(INC)/compat.h $(INC)/build.h $(INC)/glbuild.h $(SRC)/kplib.h $(INC)/pragmas.h $(INC)/cache1d.h $(INC)/baselayer.h $(SRC)/engine_priv.h $(SRC)/polymost_priv.h $(SRC)/hightile_priv.h $(SRC)/mdsprite_priv.h
$(SRC)/textfont.$o: $(SRC)/textfont.c
$(SRC)/smalltextfont.$o: $(SRC)/smalltextfont.c
$(SRC)/glbuild.$o: $(SRC)/glbuild.c $(INC)/glbuild.h $(INC)/baselayer.h
$(SRC)/kplib.$o: $(SRC)/kplib.c $(INC)/compat.h
$(SRC)/lz4.$o: $(SRC)/lz4.c $(SRC)/lz4.h $(SRC)/lz4_encoder.h
$(SRC)/lzf_c.$o: $(SRC)/lzf_c.c $(SRC)/lzfP.h
$(SRC)/lzf_d.$o: $(SRC)/lzf_d.c $(SRC)/lzfP.h
$(SRC)/md4.$o: $(SRC)/md4.c $(INC)/md4.h $(INC)/compat.h
$(SRC)/mmulti_null.$o: $(SRC)/mmulti_null.c $(INC)/mmulti.h
$(SRC)/mmulti.$o: $(SRC)/mmulti.c
$(SRC)/osd.$o: $(SRC)/osd.c $(INC)/build.h $(INC)/osd.h $(INC)/compat.h $(INC)/baselayer.h
$(SRC)/pragmas.$o: $(SRC)/pragmas.c $(INC)/compat.h
$(SRC)/scriptfile.$o: $(SRC)/scriptfile.c $(INC)/scriptfile.h $(INC)/cache1d.h $(INC)/compat.h
$(SRC)/sdlayer.$o: $(SRC)/sdlayer.c $(INC)/compat.h $(INC)/sdlayer.h $(INC)/baselayer.h $(INC)/cache1d.h $(INC)/pragmas.h $(SRC)/a.h $(INC)/build.h $(INC)/osd.h $(INC)/glbuild.h
$(SRC)/winlayer.$o: $(SRC)/winlayer.c $(INC)/compat.h $(INC)/winlayer.h $(INC)/baselayer.h $(INC)/pragmas.h $(INC)/build.h $(SRC)/a.h $(INC)/osd.h $(SRC)/dxdidf.h $(INC)/glbuild.h
$(SRC)/gtkbits.$o: $(SRC)/gtkbits.c $(INC)/baselayer.h $(INC)/build.h $(INC)/dynamicgtk.h
$(SRC)/dynamicgtk.$o: $(SRC)/dynamicgtk.c $(INC)/dynamicgtk.h

$(SRC)/startwin.editor.$o: $(SRC)/startwin.editor.c $(INC)/build.h $(INC)/editor.h $(INC)/winlayer.h $(INC)/compat.h $(INC)/startwin.editor.h
$(SRC)/startgtk.editor.$o: $(SRC)/startgtk.editor.c $(INC)/baselayer.h $(INC)/build.h $(INC)/editor.h $(INC)/compat.h

# KenBuild test game
$(GAME)/game.$o: $(GAME)/game.c $(INC)/compat.h $(INC)/build.h $(GAME)/names.h $(INC)/pragmas.h $(INC)/cache1d.h $(GAME)/game.h $(INC)/osd.h $(INC)/baselayer.h
$(GAME)/bstub.$o: $(GAME)/bstub.c $(INC)/compat.h $(INC)/build.h $(INC)/pragmas.h $(INC)/baselayer.h $(GAME)/names.h $(INC)/osd.h $(INC)/cache1d.h $(INC)/editor.h
$(GAME)/config.$o: $(GAME)/config.c $(INC)/compat.h $(INC)/osd.h $(INC)/editor.h
$(GAME)/sound.$o: $(GAME)/sound.c $(INC)/osd.h $(INC)/compat.h $(INC)/cache1d.h
$(GAME)/jfaud_sound.$o: $(GAME)/jfaud_sound.cpp $(INC)/osd.h $(INC)/compat.h $(INC)/cache1d.h
$(GAME)/startwin.game.$o: $(GAME)/startwin.game.c $(INC)/build.h $(INC)/editor.h $(INC)/winlayer.h $(INC)/compat.h $(GAME)/startwin.game.h
$(GAME)/startgtk.game.$o: $(GAME)/startgtk.game.c $(INC)/baselayer.h $(INC)/build.h $(INC)/compat.h

$(GAME)/gameres.$(res): $(GAME)/rsrc/gameres.rc $(GAME)/startwin.game.h
$(GAME)/buildres.$(res): $(GAME)/rsrc/buildres.rc $(INC)/startwin.editor.h

$(GAME)/game_icon.$o: $(GAME)/rsrc/game_icon.c
$(GAME)/build_icon.$o: $(GAME)/rsrc/build_icon.c
$(GAME)/game_banner.$o: $(GAME)/rsrc/game_banner.c
$(GAME)/editor_banner.$o: $(GAME)/rsrc/editor_banner.c

# Tools
$(TOOLS)/arttool.$o: $(TOOLS)/arttool.cc
$(TOOLS)/kextract.$o: $(TOOLS)/kextract.c $(INC)/compat.h
$(TOOLS)/kgroup.$o: $(TOOLS)/kgroup.c $(INC)/compat.h
$(TOOLS)/transpal.$o: $(TOOLS)/transpal.c $(INC)/compat.h $(INC)/pragmas.h
$(TOOLS)/wad2art.$o: $(TOOLS)/wad2art.c $(INC)/compat.h $(INC)/pragmas.h
$(TOOLS)/wad2map.$o: $(TOOLS)/wad2map.c $(INC)/compat.h $(INC)/pragmas.h
$(TOOLS)/generateicon.$o: $(TOOLS)/generateicon.c
$(TOOLS)/cacheinfo.$o: $(TOOLS)/cacheinfo.c $(INC)/compat.h
