mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-08 15:30:14 +00:00
ZAPD update: libpng, zroom improvements and others (#811)
* 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>
This commit is contained in:
parent
676ecf06c5
commit
515ebdce9d
142 changed files with 5922 additions and 14735 deletions
|
@ -1,27 +1,40 @@
|
|||
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
|
||||
|
||||
CFLAGS := -g3 -fpic -Wl,-export-dynamic -std=c++17 -rdynamic -Wall
|
||||
ifeq ($(OPTIMIZATION_ON),1)
|
||||
CFLAGS += -O2
|
||||
else
|
||||
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
|
||||
LDFLAGS := -ldl -lpng
|
||||
UNAME := $(shell uname)
|
||||
|
||||
FS_INC =
|
||||
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/OpenFBX
|
||||
SRC_DIRS := ZAPD ZAPD/ZRoom ZAPD/ZRoom/Commands ZAPD/Overlays ZAPD/HighLevel
|
||||
|
||||
CPP_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.cpp))
|
||||
CPP_FILES += lib/tinyxml2/tinyxml2.cpp
|
||||
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
|
||||
|
@ -38,6 +51,11 @@ 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)
|
||||
|
||||
|
@ -45,7 +63,7 @@ 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
|
||||
$(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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue