From 936f75b4db65ba671ce5cac7217b542c73d94a60 Mon Sep 17 00:00:00 2001 From: "Louis P. Santillan" Date: Tue, 26 May 2015 10:26:42 -0700 Subject: Renamed the djgpp README so that it gets converted to HTML by github. Fixed breakage of `make install`. --- README.DJ | 19 ------------------- READMEDJ.MD | 19 +++++++++++++++++++ lib/Makefile | 18 +++++++++--------- 3 files changed, 28 insertions(+), 28 deletions(-) delete mode 100644 README.DJ create mode 100644 READMEDJ.MD diff --git a/README.DJ b/README.DJ deleted file mode 100644 index 4d6cbcd..0000000 --- a/README.DJ +++ /dev/null @@ -1,19 +0,0 @@ -# lz4 for DOS/djgpp -This file details on how to compile lz4.exe, and liblz4.a for use on DOS/djgpp using -Andrew Wu's build-djgpp cross compilers ([GH][0], [Binaries][1]) on OSX, Linux. - -## Setup -* Download a djgpp tarball [Binaries][1] for your platform. -* Extract and install it (`tar jxvf djgpp-linux64-gcc492.tar.bz2`). Note the path. We'll assume `/home/user/djgpp`. -* Add the `bin` folder to your `PATH`. In bash, do `export PATH=/home/user/djgpp/bin:$PATH`. - -## Building LZ4 binary for DOS -* Run `make` substituting the cross compiler for `CC` and `AR`, e.g., `CC=i586-pc-msdosdjgpp-gcc AR=i586-pc-msdosdjgpp-ar make lz4programs` -* `lz4` and `lz4.exe` are then in the `programs/` subfolder. - -## Building LZ4 library for DOS -* Run `make` substituting the cross compiler for `CC` and `AR`, e.g., `CC=i586-pc-msdosdjgpp-gcc AR=i586-pc-msdosdjgpp-ar make lz4lib-djgpp` -* `liblz4.z`, `lz4.h`, `lz4hc.h`, `lz4frame.h`, and `xxhash.h` are then in the `lib/` subfolder. - -[0]: https://github.com/andrewwutw/build-djgpp -[1]: https://github.com/andrewwutw/build-djgpp/releases diff --git a/READMEDJ.MD b/READMEDJ.MD new file mode 100644 index 0000000..4d6cbcd --- /dev/null +++ b/READMEDJ.MD @@ -0,0 +1,19 @@ +# lz4 for DOS/djgpp +This file details on how to compile lz4.exe, and liblz4.a for use on DOS/djgpp using +Andrew Wu's build-djgpp cross compilers ([GH][0], [Binaries][1]) on OSX, Linux. + +## Setup +* Download a djgpp tarball [Binaries][1] for your platform. +* Extract and install it (`tar jxvf djgpp-linux64-gcc492.tar.bz2`). Note the path. We'll assume `/home/user/djgpp`. +* Add the `bin` folder to your `PATH`. In bash, do `export PATH=/home/user/djgpp/bin:$PATH`. + +## Building LZ4 binary for DOS +* Run `make` substituting the cross compiler for `CC` and `AR`, e.g., `CC=i586-pc-msdosdjgpp-gcc AR=i586-pc-msdosdjgpp-ar make lz4programs` +* `lz4` and `lz4.exe` are then in the `programs/` subfolder. + +## Building LZ4 library for DOS +* Run `make` substituting the cross compiler for `CC` and `AR`, e.g., `CC=i586-pc-msdosdjgpp-gcc AR=i586-pc-msdosdjgpp-ar make lz4lib-djgpp` +* `liblz4.z`, `lz4.h`, `lz4hc.h`, `lz4frame.h`, and `xxhash.h` are then in the `lib/` subfolder. + +[0]: https://github.com/andrewwutw/build-djgpp +[1]: https://github.com/andrewwutw/build-djgpp/releases diff --git a/lib/Makefile b/lib/Makefile index 7c9062e..787e971 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -60,26 +60,26 @@ else SHARED_EXT_VER = $(SHARED_EXT).$(LIBVER) endif -.PHONY: default all liblz4 liblz4 liblz4-static liblz4 clean install uninstall +.PHONY: default all liblz4 liblz4-static clean install uninstall default: liblz4 all: liblz4 -liblz4: liblz4-static liblz4-dynamic - -liblz4-static: lz4.c lz4hc.c lz4frame.c xxhash.c - @echo compiling static library - @$(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -c $^ - @$(AR) rcs liblz4.a lz4.o lz4hc.o lz4frame.o xxhash.o - -liblz4-dynamic: lz4.c lz4hc.c lz4frame.c xxhash.c +liblz4: liblz4.a lz4.c lz4hc.c lz4frame.c xxhash.c @echo compiling dynamic library $(LIBVER) @$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared $^ -fPIC $(SONAME_FLAGS) -o $@.$(SHARED_EXT_VER) @echo creating versioned links @ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT_MAJOR) @ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT) +liblz4.a: lz4.c lz4hc.c lz4frame.c xxhash.c + @echo compiling static library + @$(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -c $^ + @$(AR) rcs liblz4.a lz4.o lz4hc.o lz4frame.o xxhash.o + +liblz4-static: liblz4.a + clean: @rm -f core *.o *.a *.$(SHARED_EXT) *.$(SHARED_EXT).* liblz4.pc @echo Cleaning library completed -- cgit v0.12