2019-01-31 22:51:20 +01:00
|
|
|
# Map JSON data
|
|
|
|
|
|
|
|
MAPS_DIR = $(DATA_ASM_SUBDIR)/maps
|
|
|
|
LAYOUTS_DIR = $(DATA_ASM_SUBDIR)/layouts
|
|
|
|
|
2019-03-05 07:46:20 +01:00
|
|
|
MAP_DIRS := $(dir $(wildcard $(MAPS_DIR)/*/map.json))
|
2019-01-31 22:51:20 +01:00
|
|
|
MAP_CONNECTIONS := $(patsubst $(MAPS_DIR)/%/,$(MAPS_DIR)/%/connections.inc,$(MAP_DIRS))
|
|
|
|
MAP_EVENTS := $(patsubst $(MAPS_DIR)/%/,$(MAPS_DIR)/%/events.inc,$(MAP_DIRS))
|
|
|
|
MAP_HEADERS := $(patsubst $(MAPS_DIR)/%/,$(MAPS_DIR)/%/header.inc,$(MAP_DIRS))
|
|
|
|
|
|
|
|
$(DATA_ASM_BUILDDIR)/maps.o: $(DATA_ASM_SUBDIR)/maps.s $(LAYOUTS_DIR)/layouts.inc $(LAYOUTS_DIR)/layouts_table.inc $(MAPS_DIR)/headers.inc $(MAPS_DIR)/groups.inc $(MAPS_DIR)/connections.inc $(MAP_CONNECTIONS) $(MAP_HEADERS)
|
2020-12-17 02:31:56 +01:00
|
|
|
$(PREPROC) $< charmap.txt | $(CPP) -I include - | $(AS) $(ASFLAGS) -o $@
|
2019-01-31 22:51:20 +01:00
|
|
|
$(DATA_ASM_BUILDDIR)/map_events.o: $(DATA_ASM_SUBDIR)/map_events.s $(MAPS_DIR)/events.inc $(MAP_EVENTS)
|
2020-12-17 02:31:56 +01:00
|
|
|
$(PREPROC) $< charmap.txt | $(CPP) -I include - | $(AS) $(ASFLAGS) -o $@
|
2019-01-31 22:51:20 +01:00
|
|
|
|
|
|
|
$(MAPS_DIR)/%/header.inc: $(MAPS_DIR)/%/map.json
|
2019-02-05 00:28:45 +01:00
|
|
|
$(MAPJSON) map emerald $< $(LAYOUTS_DIR)/layouts.json
|
2019-01-31 22:51:20 +01:00
|
|
|
$(MAPS_DIR)/%/events.inc: $(MAPS_DIR)/%/header.inc ;
|
|
|
|
$(MAPS_DIR)/%/connections.inc: $(MAPS_DIR)/%/events.inc ;
|
|
|
|
|
|
|
|
$(MAPS_DIR)/groups.inc: $(MAPS_DIR)/map_groups.json
|
2019-02-05 00:28:45 +01:00
|
|
|
$(MAPJSON) groups emerald $<
|
2019-01-31 22:51:20 +01:00
|
|
|
$(MAPS_DIR)/connections.inc: $(MAPS_DIR)/groups.inc ;
|
|
|
|
$(MAPS_DIR)/events.inc: $(MAPS_DIR)/connections.inc ;
|
|
|
|
$(MAPS_DIR)/headers.inc: $(MAPS_DIR)/events.inc ;
|
|
|
|
include/constants/map_groups.h: $(MAPS_DIR)/headers.inc ;
|
|
|
|
|
|
|
|
$(LAYOUTS_DIR)/layouts.inc: $(LAYOUTS_DIR)/layouts.json
|
2019-02-05 00:28:45 +01:00
|
|
|
$(MAPJSON) layouts emerald $<
|
2019-01-31 22:51:20 +01:00
|
|
|
$(LAYOUTS_DIR)/layouts_table.inc: $(LAYOUTS_DIR)/layouts.inc ;
|
|
|
|
include/constants/layouts.h: $(LAYOUTS_DIR)/layouts_table.inc ;
|