unalz/makefile

109 lines
3.1 KiB
Makefile
Raw Normal View History

2020-05-05 18:22:29 +00:00
CPP = g++
CC = gcc
2020-05-05 18:22:31 +00:00
OBJ = UnAlzBz2decompress.o UnAlzBzip2.o UnAlzbzlib.o zlib/adler32.o zlib/crc32.o zlib/infblock.o zlib/infcodes.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/infutil.o zlib/zutil.o bzip2/blocksort.o bzip2/compress.o bzip2/crctable.o bzip2/huffman.o bzip2/randtable.o
2020-05-05 18:22:29 +00:00
LINKOBJ = main.o UnAlz.o UnAlzBz2decompress.o UnAlzBzip2.o UnAlzbzlib.o zlib/adler32.o zlib/crc32.o zlib/infblock.o zlib/infcodes.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/infutil.o zlib/zutil.o bzip2/blocksort.o bzip2/compress.o bzip2/crctable.o bzip2/huffman.o bzip2/randtable.o
BIN = unalz
2020-05-05 18:22:31 +00:00
CFLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
LDFLAGS=
#CFLAGS = -DDARWIN
#LDFLAGS=-liconv
#nothing:
all:
@echo ""
@echo "USAGE : make TARGET_SYSTEM"
@echo ""
@echo ""
@echo "TARGET_SYSTEM is one of"
@echo ""
@echo " posix : POSIX system (FreeBSD/linux/OSX/sparc)"
@echo " posix-utf8 : POSIX with utf8 filesystem(OSX)"
@echo " posix-noiconv : POSIX without libiconv (CP949 only)"
@echo ""
@echo " and 'clean' for clean"
@echo ""
posix: unalz
$(CPP) -c UnAlz.cpp -c main.cpp $(CFLAGS) -D_UNALZ_ICONV
$(CPP) $(LINKOBJ) $(LDFLAGS) -liconv -o $(BIN)
2020-05-05 18:22:33 +00:00
2020-05-05 18:22:31 +00:00
posix-utf8: unalz
$(CPP) -c UnAlz.cpp -c main.cpp $(CFLAGS) -D_UNALZ_ICONV -D_UNALZ_UTF8
$(CPP) $(LINKOBJ) $(LDFLAGS) -liconv -o $(BIN)
posix-noiconv: unalz
$(CPP) -c UnAlz.cpp -c main.cpp $(CFLAGS)
$(CPP) $(LINKOBJ) $(LDFLAGS) -o $(BIN)
2020-05-05 18:22:29 +00:00
clean:
2020-05-05 18:22:31 +00:00
rm -f $(OBJ) $(BIN) main.o UnAlz.o
2020-05-05 18:22:29 +00:00
$(BIN): $(OBJ)
2020-05-05 18:22:31 +00:00
# $(CPP) $(LINKOBJ) $(LDFLAGS) -o $(BIN)
2020-05-05 18:22:29 +00:00
2020-05-05 18:22:31 +00:00
#UnAlz.o: UnAlz.cpp
# $(CPP) -c UnAlz.cpp -o UnAlz.o $(CFLAGS)
2020-05-05 18:22:29 +00:00
2020-05-05 18:22:31 +00:00
#main.o: main.cpp
# $(CPP) -c main.cpp -o main.o $(CFLAGS)
2020-05-05 18:22:29 +00:00
UnAlzBz2decompress.o: UnAlzBz2decompress.c
$(CC) -c UnAlzBz2decompress.c -o UnAlzBz2decompress.o $(CFLAGS)
UnAlzBzip2.o: UnAlzBzip2.cpp
2020-05-05 18:22:31 +00:00
$(CPP) -c UnAlzBzip2.cpp -o UnAlzBzip2.o $(CFLAGS)
2020-05-05 18:22:29 +00:00
UnAlzbzlib.o: UnAlzbzlib.c
$(CC) -c UnAlzbzlib.c -o UnAlzbzlib.o $(CFLAGS)
zlib/adler32.o: zlib/adler32.c
$(CC) -c zlib/adler32.c -o zlib/adler32.o $(CFLAGS)
zlib/crc32.o: zlib/crc32.c
$(CC) -c zlib/crc32.c -o zlib/crc32.o $(CFLAGS)
zlib/infblock.o: zlib/infblock.c
$(CC) -c zlib/infblock.c -o zlib/infblock.o $(CFLAGS)
zlib/infcodes.o: zlib/infcodes.c
$(CC) -c zlib/infcodes.c -o zlib/infcodes.o $(CFLAGS)
zlib/inffast.o: zlib/inffast.c
$(CC) -c zlib/inffast.c -o zlib/inffast.o $(CFLAGS)
zlib/inflate.o: zlib/inflate.c
$(CC) -c zlib/inflate.c -o zlib/inflate.o $(CFLAGS)
zlib/inftrees.o: zlib/inftrees.c
$(CC) -c zlib/inftrees.c -o zlib/inftrees.o $(CFLAGS)
zlib/infutil.o: zlib/infutil.c
$(CC) -c zlib/infutil.c -o zlib/infutil.o $(CFLAGS)
zlib/zutil.o: zlib/zutil.c
$(CC) -c zlib/zutil.c -o zlib/zutil.o $(CFLAGS)
bzip2/blocksort.o: bzip2/blocksort.c
$(CC) -c bzip2/blocksort.c -o bzip2/blocksort.o $(CFLAGS)
bzip2/compress.o: bzip2/compress.c
$(CC) -c bzip2/compress.c -o bzip2/compress.o $(CFLAGS)
bzip2/crctable.o: bzip2/crctable.c
$(CC) -c bzip2/crctable.c -o bzip2/crctable.o $(CFLAGS)
bzip2/huffman.o: bzip2/huffman.c
$(CC) -c bzip2/huffman.c -o bzip2/huffman.o $(CFLAGS)
bzip2/randtable.o: bzip2/randtable.c
$(CC) -c bzip2/randtable.c -o bzip2/randtable.o $(CFLAGS)