blob: 51b6bad9c12b820b1ee76938cc3e9399705d16f5 (
plain)
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
|
obj ?= $(shell pwd)
HOSTCXX ?= g++
HOSTCC ?= gcc
BINARY:=$(obj)/cbfstool
COMMON:=common.o compress.o minilzma.o
COMMON+=LZMAEncoder.o LZInWindow.o
COMMON+=RangeCoderBit.o StreamUtils.o
COMMON+=OutBuffer.o Alloc.o CRC.o
COMMON+=cbfs-mkstage.o cbfs-mkpayload.o cbfstool.o
COMMON:=$(addprefix $(obj)/,$(COMMON))
$(obj)/%.o: %.c
$(HOSTCC) $(CFLAGS) -c -o $@ $<
$(obj)/%.o: lzma/%.cc
$(HOSTCXX) $(CXXFLAGS) -c -o $@ $<
$(obj)/%.o: lzma/C/7zip/Compress/LZMA/%.cpp
$(HOSTCXX) $(CXXFLAGS) -c -o $@ $<
$(obj)/%.o: lzma/C/7zip/Compress/LZ/%.cpp
$(HOSTCXX) $(CXXFLAGS) -c -o $@ $<
$(obj)/%.o: lzma/C/7zip/Compress/RangeCoder/%.cpp
$(HOSTCXX) $(CXXFLAGS) -c -o $@ $<
$(obj)/%.o: lzma/C/7zip/Common/%.cpp
$(HOSTCXX) $(CXXFLAGS) -c -o $@ $<
$(obj)/%.o: lzma/C/Common/%.cpp
$(HOSTCXX) $(CXXFLAGS) -c -o $@ $<
all: $(BINARY)
clean:
rm -f $(COMMON) $(BINARY)
tags:
ctags *.[ch]
CXXFLAGS=-DCOMPACT -m32
CFLAGS=-m32
LDFLAGS=-m32
$(obj)/cbfstool:$(COMMON)
$(HOSTCXX) $(LDFLAGS) -o $@ $^
strip $@
|