mirror of
https://github.com/wiiu-env/wut.git
synced 2025-01-06 14:18:15 +01:00
parent
9f6e28ea92
commit
9cd1940bc8
@ -10,7 +10,7 @@ CFILES := $(foreach dir,$(SOURCE),$(wildcard $(dir)/*.cpp))
|
||||
INCLUDES := $(foreach dir,$(INCLUDE),-I$(dir))
|
||||
|
||||
CFLAGS := -O2 -Wall --std=c++14
|
||||
LDFLAGS :=
|
||||
LDFLAGS := -lz
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <zlib.h>
|
||||
#include "elf.h"
|
||||
|
||||
#pragma pack(push, 1)
|
||||
@ -896,8 +897,8 @@ write(ElfFile &file, const std::string &filename)
|
||||
auto crc = 0u;
|
||||
|
||||
if (!section->data.empty()) {
|
||||
// TODO: Calculate crc of section->data
|
||||
crc = 0xBEEFB00B;
|
||||
crc = crc32(0, Z_NULL, 0);
|
||||
crc = crc32(crc, reinterpret_cast<Bytef *>(section->data.data()), section->data.size());
|
||||
}
|
||||
|
||||
sectionCRCs.push_back(crc);
|
||||
|
@ -2,7 +2,7 @@ WUT_ROOT := $(CURDIR)/../..
|
||||
|
||||
TARGET := readrpl
|
||||
SOURCE := .
|
||||
INCLUDE := ../common ../ext/cppformat ../ext/zlib
|
||||
INCLUDE := ../common ../ext/cppformat
|
||||
|
||||
CXX := g++
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user