forked from Freetz/freetz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
100-liblzma_cxx.patch
57 lines (57 loc) · 1.03 KB
/
100-liblzma_cxx.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
--- /dev/null
+++ CPP/7zip/Compress/LZMA_Lib/makefile.gcc
@@ -0,0 +1,54 @@
+CC = gcc
+CXX = g++
+CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -I../../../../C -I../ -I../../Common -I../../../Common
+CFLAGS = -W -Wall -Wno-unused-but-set-variable -Wno-unused-parameter -O2
+
+AR = ar
+RANLIB = ranlib
+RM = rm -f
+
+PROG = liblzma.a
+
+vpath %.c ../../../../C
+vpath %.cpp ../:../../Common:../../../Common
+
+C_OBJS = \
+ 7zCrc.o \
+ Alloc.o \
+ LzFind.o \
+ LzmaDec.o \
+ LzmaEnc.o \
+ LzmaLib.o \
+ 7zFile.o \
+ 7zStream.o
+
+CPP_OBJS = \
+ LzmaDecoder.o \
+ LzmaEncoder.o \
+ InBuffer.o \
+ OutBuffer.o \
+ FileStreams.o \
+ StreamUtils.o \
+ C_FileIO.o \
+ CRC.o \
+ IntToString.o \
+ MyString.o \
+ StringConvert.o \
+ StringToInt.o \
+ MyVector.o
+
+all: $(PROG)
+
+$(PROG): $(C_OBJS) $(CPP_OBJS)
+ $(RM) $@
+ $(AR) rcu $@ $(C_OBJS) $(CPP_OBJS)
+ $(RANLIB) $@
+
+$(C_OBJS): %.o: %.c
+ @$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
+
+$(CPP_OBJS): %.o: %.cpp
+ @$(CXX) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
+
+clean:
+ -$(RM) *.a *.o