Ticket #65561: Makefile Patched

File Makefile Patched, 2.8 KB (added by RobK88, 2 years ago)

Makefile Patched by Macports

Line 
1CPP := g++
2CC  := gcc
3OBJ := main.o UnAlz.o UnAlzUtils.o UnAlzBz2decompress.o UnAlzBzip2.o UnAlzbzlib.o zlib/adler32.o zlib/crc32.o zlib/infback.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/zutil.o bzip2/blocksort.o bzip2/compress.o bzip2/crctable.o bzip2/huffman.o bzip2/randtable.o
4BIN := unalz
5LDFLAGS += -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64
6CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64-Os -arch x86_64
7CXXFLAGS=-Os -stdlib=libc++ -arch x86_64
8CXXFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
9
10all:
11        @echo ""
12        @echo "USAGE : make TARGET_SYSTEM"
13        @echo ""
14        @echo ""
15        @echo "TARGET_SYSTEM is one of"
16        @echo ""
17        @echo " posix-utf8        : POSIX with utf8 filesystem(Most of modern OS, e.g. OSX/Ubuntu)"
18
19        @echo " posix             : POSIX system (FreeBSD/linux/OSX/sparc/Win32)"
20        @echo " linux-utf8        : LINUX with utf8 filesystem(without -liconv option)"
21        @echo " posix-noiconv     : POSIX without libiconv (Windows(MINGW32,CYGWIN) or EUC-KR file system)"
22        @echo ""
23        @echo " 'install' for copy unalz to /usr/local/bin and  "
24        @echo " 'clean' for clean"
25        @echo ""
26
27posix: unalz
28        $(CPP) -c UnAlz.cpp -c UnAlzUtils.cpp -c main.cpp -D_UNALZ_ICONV $(CXXFLAGS)
29        $(CPP) $(OBJ) $(LDFLAGS) -liconv -o $(BIN)
30
31posix-utf8: unalz
32        $(CPP) -c UnAlz.cpp -c UnAlzUtils.cpp -c main.cpp -D_UNALZ_ICONV -D_UNALZ_UTF8 $(CXXFLAGS)
33        $(CPP) $(OBJ) $(LDFLAGS) -liconv -o $(BIN)
34
35posix-noiconv: unalz
36        $(CPP) -c UnAlz.cpp -c UnAlzUtils.cpp -c main.cpp $(CXXFLAGS)
37        $(CPP) $(OBJ) $(LDFLAGS) -o $(BIN)
38
39linux-utf8: unalz
40        $(CPP) -c UnAlz.cpp -c UnAlzUtils.cpp -c main.cpp -D_UNALZ_ICONV -D_UNALZ_UTF8 $(CXXFLAGS)
41        $(CPP) $(OBJ) $(LDFLAGS) -o $(BIN)
42
43install:
44        cp unalz /usr/local/bin/
45
46clean:
47        rm -f $(OBJ) $(BIN)
48
49$(BIN): $(OBJ)
50
51
52zlib/adler32.o: zlib/adler32.c
53        $(CC) -c zlib/adler32.c -o zlib/adler32.o $(CFLAGS)
54
55zlib/crc32.o: zlib/crc32.c
56        $(CC) -c zlib/crc32.c -o zlib/crc32.o $(CFLAGS)
57
58zlib/infback.o: zlib/infback.c
59        $(CC) -c zlib/infback.c -o zlib/infback.o $(CFLAGS)
60
61zlib/inffast.o: zlib/inffast.c
62        $(CC) -c zlib/inffast.c -o zlib/inffast.o $(CFLAGS)
63
64zlib/inflate.o: zlib/inflate.c
65        $(CC) -c zlib/inflate.c -o zlib/inflate.o $(CFLAGS)
66
67zlib/inftrees.o: zlib/inftrees.c
68        $(CC) -c zlib/inftrees.c -o zlib/inftrees.o $(CFLAGS)
69
70zlib/zutil.o: zlib/zutil.c
71        $(CC) -c zlib/zutil.c -o zlib/zutil.o $(CFLAGS)
72
73bzip2/blocksort.o: bzip2/blocksort.c
74        $(CC) -c bzip2/blocksort.c -o bzip2/blocksort.o $(CFLAGS)
75
76bzip2/compress.o: bzip2/compress.c
77        $(CC) -c bzip2/compress.c -o bzip2/compress.o $(CFLAGS)
78
79bzip2/crctable.o: bzip2/crctable.c
80        $(CC) -c bzip2/crctable.c -o bzip2/crctable.o $(CFLAGS)
81
82bzip2/huffman.o: bzip2/huffman.c
83        $(CC) -c bzip2/huffman.c -o bzip2/huffman.o $(CFLAGS)
84
85bzip2/randtable.o: bzip2/randtable.c
86        $(CC) -c bzip2/randtable.c -o bzip2/randtable.o $(CFLAGS)
87