mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-14 05:19:36 +00:00
515ebdce9d
* git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "769f5702a" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "769f5702a" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * Add `libpng` to readme * Remove `-ifp` since it doesn't exists anymore in ZAPD * Remove extra print I added * Add UNK_09 macro and other minor fixes * Simplify PNG rules * simplify gitignore * Update README.md Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update dockerfile * basic instructions for cygwin and mac * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "86160be69" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "86160be69" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * Change nanoseconds to seconds in extract_assets.py Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
69 lines
1.6 KiB
Makefile
69 lines
1.6 KiB
Makefile
OPTIMIZATION_ON ?= 1
|
|
ASAN ?= 0
|
|
DEPRECATION_OFF ?= 0
|
|
CFLAGS ?=
|
|
|
|
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 -ggdb -fpic -std=c++17 -rdynamic -Wall -fno-omit-frame-pointer
|
|
|
|
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: 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)
|