From 0f258b94f7adb559dc96ac406cee2c24ef549912 Mon Sep 17 00:00:00 2001 From: leo60228 Date: Mon, 18 Apr 2022 19:32:23 -0400 Subject: [PATCH] Support Linux builds --- .gitignore | 2 ++ Makefile | 11 +++++++++++ WudCompress/wud.h | 8 +++++++- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f9c919c --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.o +WudCompress/WudCompress diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d1df704 --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +WudCompress/WudCompress: WudCompress/main.o WudCompress/wud.o + $(CXX) $(LDFLAGS) -o $@ $^ + +install: WudCompress/WudCompress + install -d $(DESTDIR)/bin/ + install WudCompress/WudCompress $(DESTDIR)/bin/ + +clean: + rm -f WudCompress/WudCompress WudCompress/main.o WudCompress/wud.o + +.PHONY: install diff --git a/WudCompress/wud.h b/WudCompress/wud.h index b748d29..5ac850a 100644 --- a/WudCompress/wud.h +++ b/WudCompress/wud.h @@ -29,4 +29,10 @@ void wud_close(wud_t* wud); unsigned int wud_readData(wud_t* wud, void* buffer, unsigned int length, long long offset); bool wud_isWUXCompressed(wud_t* wud); -long long wud_getWUDSize(wud_t* wud); \ No newline at end of file +long long wud_getWUDSize(wud_t* wud); + +#ifndef _WIN32 +#define _fseeki64 fseeko +#define _ftelli64 ftello +#define stricmp strcasecmp +#endif