diff options
author | Yann Collet <cyan@fb.com> | 2017-08-14 23:56:05 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2017-08-14 23:56:05 (GMT) |
commit | 01cdbfb5feda4adee65cc3da04b426c0c22368a3 (patch) | |
tree | 72a1402855ce496d1b96ac455cd3f72500736fd4 /programs/Makefile | |
parent | 731cff12080f1309af4abde122fe09ae0076f424 (diff) | |
download | lz4-01cdbfb5feda4adee65cc3da04b426c0c22368a3.zip lz4-01cdbfb5feda4adee65cc3da04b426c0c22368a3.tar.gz lz4-01cdbfb5feda4adee65cc3da04b426c0c22368a3.tar.bz2 |
lz4c legacy commands are now enabled at runtime based on link/binary name "lz4c"
instead of selected at compilation time depending on a macro.
This design makes it possible to have a single binary which supports both modes.
An advantageous side effect is that when doing `make; make install`
no additional binary is created during `make install`
(it used to create `lz4c`, because `make` would only build `lz4`)
Diffstat (limited to 'programs/Makefile')
-rw-r--r-- | programs/Makefile | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/programs/Makefile b/programs/Makefile index 224b013..c7ef6d1 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -82,10 +82,12 @@ lz4-release: DEBUGFLAGS= lz4-release: lz4 lz4c32: CFLAGS += -m32 -lz4c: CPPFLAGS += -DENABLE_LZ4C_LEGACY_OPTIONS -lz4c lz4c32 : $(SRCFILES) +lz4c32 : $(SRCFILES) $(CC) $(FLAGS) $^ -o $@$(EXT) +lz4c: lz4 + ln -s lz4 lz4c + lz4.1: lz4.1.md cat $^ | $(MD2ROFF) $(MD2ROFF_FLAGS) | sed -n '/^\.\\\".*/!p' > $@ |