~dricottone/my-utils

ref: 96238abdd70e2f5452e423295e20fb14437a95d0 my-utils/Makefile -rw-r--r-- 1.4 KiB
96238abdDominic Ricottone Big archival update 2 years ago
                                                                                
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
BIN_DIR?=/usr/local/bin
LIB_DIR?=/usr/local/lib
COMP_DIR?=/usr/local/etc/bash_completion.d

.PHONY: install uninstall test clean

define subdir_make
	cd $(1) && BIN_DIR=$(BIN_DIR) LIB_DIR=$(LIB_DIR) COMP_DIR=$(COMP_DIR) make $(2)
	@echo ""
endef

install:
	$(call subdir_make,core,install)
	$(call subdir_make,archives,install)
	$(call subdir_make,containers,install)
	$(call subdir_make,display,install)
	$(call subdir_make,emulation,install)
	$(call subdir_make,games,install)
	$(call subdir_make,network,install)
	$(call subdir_make,sound,install)

uninstall:
	$(call subdir_make,core,uninstall)
	$(call subdir_make,archives,uninstall)
	$(call subdir_make,containers,uninstall)
	$(call subdir_make,display,uninstall)
	$(call subdir_make,emulation,uninstall)
	$(call subdir_make,games,uninstall)
	$(call subdir_make,network,uninstall)
	$(call subdir_make,sound,uninstall)

test: clean
	$(call subdir_make,core,test)
	$(call subdir_make,archives,test)
	$(call subdir_make,containers,test)
	$(call subdir_make,display,test)
	$(call subdir_make,emulation,test)
	$(call subdir_make,games,test)
	$(call subdir_make,network,test)
	$(call subdir_make,sound,test)

clean:
	$(call subdir_make,core,clean)
	$(call subdir_make,archives,clean)
	$(call subdir_make,containers,clean)
	$(call subdir_make,display,clean)
	$(call subdir_make,emulation,clean)
	$(call subdir_make,games,clean)
	$(call subdir_make,network,clean)
	$(call subdir_make,sound,clean)