CPP = g++ CC = gcc OBJ = main.o UnAlz.o UnAlzUtils.o UnAlzBz2decompress.o UnAlzBzip2.o UnAlzbzlib.o BIN = unalz LDFLAGS = CFLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 all: @echo "" @echo "USAGE : make TARGET_SYSTEM" @echo "" @echo "" @echo "TARGET_SYSTEM is one of" @echo "" @echo " posix-utf8 : POSIX with utf8 filesystem(Most of modern OS, e.g. OSX/Ubuntu)" @echo " posix : POSIX system (FreeBSD/linux/OSX/sparc/Win32)" @echo " linux-utf8 : LINUX with utf8 filesystem(without -liconv option)" @echo " posix-noiconv : POSIX without libiconv (Windows(MINGW32,CYGWIN) or EUC-KR file system)" @echo "" @echo " 'install' for copy unalz to /usr/local/bin and " @echo " 'clean' for clean" @echo "" posix: unalz $(CPP) -c UnAlz.cpp -c UnAlzUtils.cpp -c main.cpp -D_UNALZ_ICONV $(CFLAGS) $(CPP) $(OBJ) $(LDFLAGS) -liconv -o $(BIN) posix-utf8: unalz $(CPP) -c UnAlz.cpp -c UnAlzUtils.cpp -c main.cpp -D_UNALZ_ICONV -D_UNALZ_UTF8 $(CFLAGS) $(CPP) $(OBJ) $(LDFLAGS) -liconv -lz -lbz2 -o $(BIN) posix-noiconv: unalz $(CPP) -c UnAlz.cpp -c UnAlzUtils.cpp -c main.cpp $(CFLAGS) $(CPP) $(OBJ) $(LDFLAGS) -o $(BIN) linux-utf8: unalz $(CPP) -c UnAlz.cpp -c UnAlzUtils.cpp -c main.cpp -D_UNALZ_ICONV -D_UNALZ_UTF8 $(CFLAGS) $(CPP) $(OBJ) $(LDFLAGS) -lz -lbz2 -o $(BIN) install: cp unalz /usr/local/bin/ clean: rm -f $(OBJ) $(BIN) $(BIN): $(OBJ)