1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-14 05:19:36 +00:00
oot/tools/ZAPD/Makefile
Nicholas Estelami 0432011bd9
Updated to use latest version of ZAPD (#777)
* Updated config file

* Added missing files

* Temporarily removed asm_processor changes.

* git subrepo pull --force tools/ZAPD

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

* git subrepo pull --force tools/ZAPD

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

* Cleanup and fixes.

* git subrepo pull --force tools/ZAPD

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

* Makefile fix

* git subrepo pull --force tools/ZAPD

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

Co-authored-by: Jack Walker <7463599+Jack-Walker@users.noreply.github.com>
2021-04-30 23:23:22 +02:00

51 lines
1.1 KiB
Makefile

OPTIMIZATION_ON ?= 1
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 := -g3 -fpic -Wl,-export-dynamic -std=c++17 -rdynamic -Wall
ifeq ($(OPTIMIZATION_ON),1)
CFLAGS += -O2
else
CFLAGS += -O0
endif
LDFLAGS := -ldl
UNAME := $(shell uname)
FS_INC =
ifneq ($(UNAME), Darwin)
FS_INC += -lstdc++fs
endif
SRC_DIRS := ZAPD ZAPD/ZRoom ZAPD/ZRoom/Commands ZAPD/Overlays ZAPD/HighLevel ZAPD/OpenFBX
CPP_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.cpp))
CPP_FILES += lib/tinyxml2/tinyxml2.cpp
O_FILES := $(CPP_FILES:.cpp=.o)
all: ZAPD.out copycheck
genbuildinfo:
python3 ZAPD/genbuildinfo.py
copycheck: ZAPD.out
python3 copycheck.py
clean:
rm -f $(O_FILES) ZAPD.out
$(MAKE) -C lib/libgfxd clean
rebuild: clean all
%.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 -j
ZAPD.out: $(O_FILES) lib/libgfxd/libgfxd.a
$(CC) $(CFLAGS) $(INC) $(O_FILES) lib/libgfxd/libgfxd.a -o $@ $(FS_INC) $(LDFLAGS)