File: Makefile

package info (click to toggle)
openni-sensor-pointclouds 5.1.0.41.9-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,648 kB
  • sloc: cpp: 34,881; ansic: 14,901; sh: 245; python: 155; makefile: 93; xml: 8
file content (76 lines) | stat: -rw-r--r-- 1,820 bytes parent folder | download | duplicates (12)
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
76

#/******************************************************************************
#*                                                                             *
#*   PrimeSense Sensor 5.0 Makefile                                            *
#*   Copyright (C) 2010 PrimeSense Ltd.                                        *
#*                                                                             *
#******************************************************************************/
# default config is Release
ifndef CFG
    CFG = Release
endif

# list all modules
ALL_PROJS = \
	XnCore \
	XnFormats \
	XnDDK \
	XnDeviceSensorV2 \
	Utils/XnSensorServer \
	XnDeviceFile \

                
ALL_PROJS_CLEAN = $(foreach proj,$(ALL_PROJS),$(proj)-clean)

# define a function which creates a target for each proj
define CREATE_PROJ_TARGET

.PHONY: $1 $1-clean

$1:
	$(MAKE) -C $1 CFG=$(CFG)

$1-clean: 
	$(MAKE) -C $1 CFG=$(CFG) clean

endef

########### TARGETS ##############

.PHONY: all install uninstall clean

# make all makefiles
all: $(ALL_PROJS)

# create projects targets
$(foreach proj,$(ALL_PROJS),$(eval $(call CREATE_PROJ_TARGET,$(proj))))

# additional dependencies
XnFormats: XnCore
XnDDK: XnCore
XnDDK: XnFormats
XnLeanDeviceSensorV2: XnDDK
XnLeanDeviceSensorV2: XnFormats
XnLeanDeviceSensorV2: XnCore
Utils/XnSensorServer: XnDDK
Utils/XnSensorServer: XnDeviceSensorV2
Utils/XnSensorServer: XnFormats
XnDeviceFile: XnCore
XnDeviceFile: XnDDK
XnDeviceFile: XnFormats

# clean is cleaning all projects
clean: $(ALL_PROJS_CLEAN)

# redist target
redist: all
	cd ../CreateRedist; ./RedistMaker; cd -

# install target
install: redist
	cd ../Redist; ./install.sh; cd -

# uninstall
uninstall: 
	cd ../Redist; ./install.sh -u; cd -