Skip to content

Commit

Permalink
Support Linux builds
Browse files Browse the repository at this point in the history
  • Loading branch information
leo60228 committed Apr 18, 2022
1 parent b0ab5f6 commit 85285bb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.o
WudCompress/WudCompress
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
CXXFLAGS += -D_FILE_OFFSET_BITS=64

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
8 changes: 7 additions & 1 deletion WudCompress/wud.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
long long wud_getWUDSize(wud_t* wud);

#ifndef _WIN32
#define _fseeki64 fseeko
#define _ftelli64 ftello
#define stricmp strcasecmp
#endif

0 comments on commit 85285bb

Please sign in to comment.