Commit c3f91d1a authored by Mark Adler's avatar Mark Adler

Put libraries at end of load commands for as-needed use case.

parent e223c895
CFLAGS=-O3 -Wall -Wextra
LIBS=-lm -lpthread -lz
# use gcc and gmake on Solaris
pigz: pigz.o yarn.o try.o ${ZOPFLI}deflate.o ${ZOPFLI}blocksplitter.o ${ZOPFLI}tree.o ${ZOPFLI}lz77.o ${ZOPFLI}cache.o ${ZOPFLI}hash.o ${ZOPFLI}util.o ${ZOPFLI}squeeze.o ${ZOPFLI}katajainen.o
$(CC) $(LDFLAGS) -o pigz $^ -lpthread -lm
$(CC) $(LDFLAGS) -o pigz $^ $(LIBS)
ln -f pigz unpigz
pigz.o: pigz.c yarn.h try.h ${ZOPFLI}deflate.h ${ZOPFLI}util.h
......@@ -35,7 +36,7 @@ ${ZOPFLI}katajainen.o: ${ZOPFLI}katajainen.c ${ZOPFLI}katajainen.h
dev: pigz pigzt pigzn
pigzt: pigzt.o yarnt.o try.o ${ZOPFLI}deflate.o ${ZOPFLI}blocksplitter.o ${ZOPFLI}tree.o ${ZOPFLI}lz77.o ${ZOPFLI}cache.o ${ZOPFLI}hash.o ${ZOPFLI}util.o ${ZOPFLI}squeeze.o ${ZOPFLI}katajainen.o
$(CC) $(LDFLAGS) -o pigzt $^ -lpthread -lm
$(CC) $(LDFLAGS) -o pigzt $^ $(LIBS)
pigzt.o: pigz.c yarn.h try.h
$(CC) $(CFLAGS) -DDEBUG -g -c -o pigzt.o pigz.c
......@@ -44,7 +45,7 @@ yarnt.o: yarn.c yarn.h
$(CC) $(CFLAGS) -DDEBUG -g -c -o yarnt.o yarn.c
pigzn: pigzn.o tryn.o ${ZOPFLI}deflate.o ${ZOPFLI}blocksplitter.o ${ZOPFLI}tree.o ${ZOPFLI}lz77.o ${ZOPFLI}cache.o ${ZOPFLI}hash.o ${ZOPFLI}util.o ${ZOPFLI}squeeze.o ${ZOPFLI}katajainen.o
$(CC) $(LDFLAGS) -o pigzn $^ -lm
$(CC) $(LDFLAGS) -o pigzn $^ $(LIBS)
pigzn.o: pigz.c try.h
$(CC) $(CFLAGS) -DDEBUG -DNOTHREAD -g -c -o pigzn.o pigz.c
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment