]> git.ipfire.org Git - people/stevee/pakfire.git/blob - tools/Makefile
d7cbf709a2c6762da4b0965378dec3b5df32fa9d
[people/stevee/pakfire.git] / tools / Makefile
1
2 include ../Makeconfig
3
4 # Elfutils
5 LIBS_ELF = -lelf
6
7 # Beecrypt
8 LIBS_BEECRYPT = -lbeecrypt -lgomp
9
10 # popt
11 LIBS_POPT = -lpopt
12
13 SCRIPTS = $(SCRIPTS_BIN) $(SCRIPTS_SHELL)
14 SCRIPTS_BIN = \
15 debugedit
16
17 SCRIPTS_SHELL = \
18 chroot-shell \
19 cleanup \
20 compress-man-pages \
21 extract-debuginfo \
22 find-common \
23 find-prerequires \
24 find-provides \
25 find-requires \
26 pakfire-multicall.py \
27 patch \
28 py-compile \
29 quality-agent \
30 remove-static-libs \
31 $(wildcard functions-*) \
32 $(wildcard *.prov) \
33 $(wildcard *.req)
34
35 .PHONY: all
36 all: $(SCRIPTS)
37
38 %.o: %.c Makefile
39 $(CC) $(CFLAGS) -I. -o $@ -c $<
40
41 debugedit: debugedit.o hashtab.o
42 $(CC) $(CFLAGS) -o $@ $^ $(LIBS_BEECRYPT) $(LIBS_ELF) $(LIBS_POPT)
43
44 .PHONY: install
45 install: $(SCRIPTS)
46 -mkdir -pv $(DESTDIR)$(SCRIPT_DIR)
47 for file in $^; do \
48 cp -vrf $${file} $(DESTDIR)$(SCRIPT_DIR)/ || exit; \
49 done
50
51 # Create script aliases.
52 -mkdir -pv $(DESTDIR)/usr/bin
53 ln -svf ../..$(SCRIPT_DIR)/pakfire-multicall.py $(DESTDIR)/usr/bin/pakfire
54 ln -svf ../..$(SCRIPT_DIR)/pakfire-multicall.py $(DESTDIR)/usr/bin/pakfire-builder
55 ln -svf ../..$(SCRIPT_DIR)/pakfire-multicall.py $(DESTDIR)/usr/bin/pakfire-client
56 ln -svf ../..$(SCRIPT_DIR)/pakfire-multicall.py $(DESTDIR)/usr/bin/pakfire-daemon
57 ln -svf ../..$(SCRIPT_DIR)/pakfire-multicall.py $(DESTDIR)/usr/bin/pakfire-key
58 ln -svf ../..$(SCRIPT_DIR)/pakfire-multicall.py $(DESTDIR)/usr/bin/pakfire-server
59 ln -svf pakfire-multicall.py $(DESTDIR)$(SCRIPT_DIR)/builder
60
61 # Install QA.
62 -mkdir -pv $(DESTDIR)/usr/lib/quality-agent
63 cp -vf quality-agent.d/* $(DESTDIR)/usr/lib/quality-agent
64
65 .PHONY: clean
66 clean:
67 : # Nothing yet to do