blob: c3ba563539a6d15c699de68bb559899b833c980c (
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
52
53
54
55
56
|
From c43707516a42e3ca4c469b338c3e58a0f3def473 Mon Sep 17 00:00:00 2001
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
Date: Tue, 30 Sep 2025 23:00:34 +0200
Subject: [PATCH] Makefile: abstract ar to $(AR) and remove tags from all
Build systems need to be able to use a custom `ar` binary. Also, running
ctags is generally not desirable for the default target.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
Sent upstream as: https://github.com/alexpevzner/sane-airscan/pull/197
Makefile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index d34c335..6380730 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,7 @@
# ---- ------- -----------
# DESTDIR Destination directory for make install
# CC gcc C compiler
+# AR ar Archiver
# CPPFLAGS C preprocessor flags
# CFLAGS -O2 -g -W -Wall -Werror C compiler flags
# LDFLAGS Linker flags
@@ -28,6 +29,7 @@
#
CC = gcc
+AR = ar
COMPRESS = gzip -n
CFLAGS += -O2 -g -W -Wall -Werror -pthread $(CPPFLAGS)
PKG_CONFIG = pkg-config
@@ -101,7 +103,7 @@ $(OBJDIR)%.o: %.c Makefile airscan.h
.PHONY: all clean install man
-all: tags $(BACKEND) $(DISCOVER) test test-decode test-devcaps test-multipart test-zeroconf test-uri
+all: $(BACKEND) $(DISCOVER) test test-decode test-devcaps test-multipart test-zeroconf test-uri
tags: $(SRC) airscan.h test.c test-decode.c test-devcaps.c test-multipart.c test-zeroconf.c test-uri.c
-ctags -R .
@@ -113,7 +115,7 @@ $(DISCOVER): $(OBJDIR)discover.o $(LIBAIRSCAN)
$(CC) -o $(DISCOVER) discover.c $(CPPFLAGS) $(common_CFLAGS) $(LIBAIRSCAN) $(tools_LDFLAGS)
$(LIBAIRSCAN): $(OBJ) Makefile
- ar cru $(LIBAIRSCAN) $(OBJ)
+ $(AR) cru $(LIBAIRSCAN) $(OBJ)
install: all
mkdir -p $(DESTDIR)/$(bindir)
--
2.51.0
|