This repository has been archived by the owner on Feb 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.in
75 lines (59 loc) · 2.18 KB
/
Makefile.in
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Copyright (C) Kamila Szewczyk 2022
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
CONFIG=-Ivendor/zpaq -Ivendor/lz4/lib -Ivendor/zstd/lib -Ivendor/fast-lzma2 \
-Ivendor/bzip3/include -Iinclude
PROGRAM=mrzip
all:
$(MAKE) -C common all
$(MAKE) $(PROGRAM)
$(MAKE) -C rs-mrzip all
$(MAKE) -C ar-mrzip all
include common.mk
MRZIP_SOURCES=$(wildcard src/*.c)
MRZIP_OBJECTS=$(MRZIP_SOURCES:.c=.o)
ZSTD_SOURCES=$(wildcard vendor/zstd/lib/common/*.c) \
$(wildcard vendor/zstd/lib/compress/*.c) \
$(wildcard vendor/zstd/lib/decompress/*.c)
ZSTD_OBJECTS=$(ZSTD_SOURCES:.c=.o)
FLZMA2_SOURCES=$(wildcard vendor/fast-lzma2/*.c)
FLZMA2_OBJECTS=$(FLZMA2_SOURCES:.c=.o)
MRZIP_LIBS=vendor/cxx_glue.o vendor/zpaq/libzpaq.o \
vendor/lz4/lib/lz4.o vendor/lz4/lib/lz4hc.o \
vendor/bzip3/src/libbz3.o @ASOBJ@ \
$(ZSTD_OBJECTS) $(FLZMA2_OBJECTS)
$(PROGRAM): $(MRZIP_OBJECTS) $(MRZIP_LIBS)
@echo " CCLD" $@
@$(CXX) $(CXXFLAGS) -o $@ $^ -lm -pthread -lpthread -lgcrypt -lgpg-error @LIBINTL@ @LIBICONV@
@echo " STRIP" $@
@$(STRIP) $(PROGRAM)
.PHONY: clean
clean:
@rm -f $(PROGRAM) $(MRZIP_OBJECTS) $(MRZIP_LIBS)
$(MAKE) -C common clean
$(MAKE) -C rs-mrzip clean
$(MAKE) -C ar-mrzip clean
.PHONY: format
format:
clang-format -i src/*.c include/*.h vendor/*.cpp
$(MAKE) -C common format
$(MAKE) -C rs-mrzip format
$(MAKE) -C ar-mrzip format
.PHONY: install
install:
build-aux/install-sh -c $(PROGRAM) $(BIN_DEST)
$(MAKE) -C rs-mrzip install
$(MAKE) -C ar-mrzip install
.PHONY: uninstall
uninstall:
rm -f $(BIN_DEST)/$(PROGRAM)
$(MAKE) -C rs-mrzip uninstall
$(MAKE) -C ar-mrzip uninstall