File: makefile

package info (click to toggle)
ippusbxd 1.33-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 336 kB
  • sloc: ansic: 2,228; makefile: 34
file content (41 lines) | stat: -rw-r--r-- 1,147 bytes parent folder | download | duplicates (2)
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
SHELL := /bin/bash

ifndef VERBOSE
	CMD_VERB := @
	NOPRINTD := --no-print-directory
endif

################################################################################
BuildTargets := all clean configure redep distclean 
.PHONY: $(BuildTargets)

################################################################################
all:
ifeq ($(wildcard exe/Makefile),)
	$(CMD_VERB) $(MAKE) $(NOPRINTD) configure
	$(CMD_VERB) $(MAKE) $(NOPRINTD) -C exe
else
	$(CMD_VERB) $(MAKE) $(NOPRINTD) -C exe
endif

################################################################################
configure:
	$(CMD_VERB) rm -rf ./exe ; mkdir -p exe
	$(CMD_VERB) cd exe/ ; cmake ../src

################################################################################
redep:
	$(CMD_VERB) cd exe/ ; cmake ../src ; cd ..

################################################################################
clean:
	$(CMD_VERB) $(MAKE) $(NOPRINTD) -C exe clean

################################################################################
distclean:
	$(CMD_VERB) if [ -f exe/Makefile ]; \
		then $(MAKE) $(NOPRINTD) -C exe clean ;\
	fi
	$(CMD_VERB) rm -rf exe