files
kpack_c/Makefile

16 lines
854 B
Makefile

CFLAGS=-Wall -Wextra -g
LZMA_CFLAGS=-Wall -Wextra -O3
all: kpack_c
kpack_c: kpack_c.o LZMAEncoder.o MatchFinder.o RangeCoder.o
gcc -o kpack_c kpack_c.o LZMAEncoder.o MatchFinder.o RangeCoder.o
kpack_c.o: kpack_c.c
gcc -c $(CFLAGS) -o kpack_c.o kpack_c.c
LZMAEncoder.o: lzma_c/LZMAEncoder.c lzma_c/LZMAEncoder.h lzma_c/MatchFinder.h lzma_c/lzma.h lzma_c/RangeCoder.h lzma_c/RangeCoderBit.h lzma_c/RangeCoderBitTree.h lzma_c/common.h
gcc -c $(LZMA_CFLAGS) -o LZMAEncoder.o lzma_c/LZMAEncoder.c
MatchFinder.o: lzma_c/MatchFinder.c lzma_c/MatchFinder.h lzma_c/common.h
gcc -c $(LZMA_CFLAGS) -o MatchFinder.o lzma_c/MatchFinder.c
RangeCoder.o: lzma_c/RangeCoder.c lzma_c/RangeCoder.h lzma_c/RangeCoderBit.h lzma_c/RangeCoderBitTree.h lzma_c/lzma.h lzma_c/common.h
gcc -c $(LZMA_CFLAGS) -o RangeCoder.o lzma_c/RangeCoder.c
clean:
rm -f *.o *.exe kpack_c