Files
mm/tools/ZAPD/Makefile
T
Anghelo Carvajal b6904aa2cc Convert every submodule into subrepo (#170)
* remove ZAPD submodule

* git subrepo clone https://github.com/zeldaret/ZAPD.git tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "ca229f19"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "ca229f19"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"

* git subrepo clone https://github.com/simonlindholm/decomp-permuter.git tools/decomp-permuter

subrepo:
  subdir:   "tools/decomp-permuter"
  merged:   "1e4b85a7"
upstream:
  origin:   "https://github.com/simonlindholm/decomp-permuter.git"
  branch:   "main"
  commit:   "1e4b85a7"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"

* Remove asm-differ

* git subrepo clone https://github.com/simonlindholm/asm-differ.git tools/asm-differ

subrepo:
  subdir:   "tools/asm-differ"
  merged:   "eaf72269"
upstream:
  origin:   "https://github.com/simonlindholm/asm-differ.git"
  branch:   "master"
  commit:   "eaf72269"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"

* remove asm-processor

* git subrepo clone https://github.com/simonlindholm/asm-processor.git tools/asm-processor

subrepo:
  subdir:   "tools/asm-processor"
  merged:   "85288fcd"
upstream:
  origin:   "https://github.com/simonlindholm/asm-processor.git"
  branch:   "master"
  commit:   "85288fcd"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"

* remove .gitmodules file

* Update REAMDE

* Update warnings
2021-06-07 18:31:56 -04:00

79 lines
1.7 KiB
Makefile

OPTIMIZATION_ON ?= 1
ASAN ?= 0
DEPRECATION_OFF ?= 0
DEBUG ?= 0
CFLAGS ?=
COPYCHECK_ARGS ?=
CC := g++
INC := -I ZAPD -I lib/assimp/include -I lib/elfio -I lib/json/include -I lib/stb -I lib/tinygltf -I lib/libgfxd -I lib/tinyxml2
CFLAGS += -fpic -std=c++17 -rdynamic -Wall -fno-omit-frame-pointer
ifneq ($(DEBUG),0)
OPTIMIZATION_ON = 0
DEPRECATION_OFF = 1
CFLAGS += -g3 -DDEVELOPMENT
COPYCHECK_ARGS += --devel
endif
ifeq ($(OPTIMIZATION_ON),0)
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifneq ($(ASAN),0)
CFLAGS += -fsanitize=address
endif
ifneq ($(DEPRECATION_OFF),0)
CFLAGS += -DDEPRECATION_OFF
endif
# CFLAGS += -DTEXTURE_DEBUG
LDFLAGS := -ldl -lpng
UNAME := $(shell uname)
FS_INC ?=
ifneq ($(UNAME), Darwin)
FS_INC += -lstdc++fs
CFLAGS += -Wl,-export-dynamic
endif
SRC_DIRS := ZAPD ZAPD/ZRoom ZAPD/ZRoom/Commands ZAPD/Overlays ZAPD/HighLevel
ZAPD_CPP_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.cpp))
ZAPD_H_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.h))
CPP_FILES += $(ZAPD_CPP_FILES) lib/tinyxml2/tinyxml2.cpp
O_FILES := $(CPP_FILES:.cpp=.o)
all: ZAPD.out copycheck
genbuildinfo:
python3 ZAPD/genbuildinfo.py $(COPYCHECK_ARGS)
copycheck: ZAPD.out
python3 copycheck.py
clean:
rm -f $(O_FILES) ZAPD.out
$(MAKE) -C lib/libgfxd clean
rebuild: clean all
format:
clang-format-11 -i $(ZAPD_CPP_FILES) $(ZAPD_H_FILES)
.PHONY: all genbuildinfo copycheck clean rebuild format
%.o: %.cpp
$(CC) $(CFLAGS) $(INC) -c $< -o $@ $(LDFLAGS)
ZAPD/Main.o: genbuildinfo ZAPD/Main.cpp
$(CC) $(CFLAGS) $(INC) -c ZAPD/Main.cpp -o $@ $(LDFLAGS)
lib/libgfxd/libgfxd.a:
$(MAKE) -C lib/libgfxd
ZAPD.out: $(O_FILES) lib/libgfxd/libgfxd.a
$(CC) $(CFLAGS) $(INC) $(O_FILES) lib/libgfxd/libgfxd.a -o $@ $(FS_INC) $(LDFLAGS)