srcfiles = Makefile go.mod $(shell find . -iname *.go)

GOBUILD ?= go build -tags ebitengl

all: loader ordoor palette-idx view-font view-obj view-map view-menu view-minimap view-set

loader: $(srcfiles)
	$(GOBUILD) -o loader ./cmd/loader

palette-idx: $(srcfiles)
	$(GOBUILD) -o palette-idx ./cmd/palette-idx

view-font: $(srcfiles)
	$(GOBUILD) -o view-font ./cmd/view-font

view-obj: $(srcfiles)
	$(GOBUILD) -o view-obj ./cmd/view-obj

view-map: $(srcfiles)
	$(GOBUILD) -o view-map ./cmd/view-map

view-menu: $(srcfiles)
	$(GOBUILD) -o view-menu ./cmd/view-menu

view-minimap: $(srcfiles)
	$(GOBUILD) -o view-minimap ./cmd/view-minimap

view-set: $(srcfiles)
	$(GOBUILD) -o view-set ./cmd/view-set

ordoor: $(srcfiles)
	$(GOBUILD) -o ordoor ./cmd/ordoor

clean:
	rm -f loader ordoor view-obj view-map view-minimap view-set palette-idx view-font

.PHONY: all clean
