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