forked from browndeer/coprthr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
108 lines (74 loc) · 2.36 KB
/
Makefile.in
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
ifeq (freebsd,$(patsubst freebsd%,freebsd,@build_os@))
MAKE = gmake
else
MAKE = make
endif
prefix=@prefix@
exec_prefix=@exec_prefix@
### this useless define is needed to silence useless autoconf warning
datarootdir=@datarootdir@
INSTALL_BIN_DIR=@bindir@
INSTALL_LIB_DIR=@libdir@
INSTALL_INCLUDE_DIR=@includedir@
INSTALL_MAN_DIR=@mandir@
ifeq (@ENABLE_LIBCOPRTHR@,1)
SUBDIRS += ./src/libcoprthr ./tools/xclnm
endif
ifeq (@ENABLE_LIBOCL@,1)
SUBDIRS += ./src/libocl
endif
SUBDIRS += ./include ./src/libclelf ./src/libstdcl
ifeq (@ENABLE_CLLD@,1)
SUBDIRS += ./tools/clcc ./tools/clcc1 ./tools/clld ./tools/clnm
endif
#ifneq (freebsd,$(patsubst freebsd%,freebsd,@build_os@))
ifeq (@ENABLE_CLETE@,1)
SUBDIRS += ./src/CLETE
endif
#endif
ifeq (@ENABLE_CLTRACE@,1)
SUBDIRS += ./tools/cltrace
endif
#SUBDIRS += $(addprefix ./libs/,$(BUILD_LIBS))
#SUBDIRS += $(addprefix ./tools/,$(BUILD_TOOLS))
DISTCLEAN_DIRS = ./src/libstdcl ./src/libcoprthr ./src/libocl ./src/CLETE ./tools/cltrace ./tools/xclnm2 ./tools/clld ./test ./test/test_CLETE ./test/test_stdcl ./test/test_libcoprthr ./include ./tools/clcc ./tools/clcc1 ./tools/xclnm ./tools/clnm ./src/libclelf ./examples
export TOPDIR = $(CURDIR)
all: $(SUBDIRS)
.PHONY: subdirs $(SUBDIRS) clean distclean install uninstall test quicktest
subdirs: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@ $(MAKEFLAGS) $(MAKECMDGOALS)
clean: subdirs
$(MAKE) -C ./test $(MAKECMDGOALS)
# $(MAKE) -C ./examples $(MAKECMDGOALS)
distclean:
@dirs="$(DISTCLEAN_DIRS)"; for dir in $$dirs; do \
$(MAKE) -C $$dir distclean; \
rm -f $$dir/Makefile; \
done
rm -f Makefile
echo-install:
echo $(INSTALL_BIN_DIR)
install: subdirs
test -d $(prefix) || install -m 755 -d $(prefix)
@cp -Rf ./doc $(prefix)
@cp -Rf ./examples $(prefix)
@cp -Rf ./test $(prefix)
@chmod -R a+rX $(prefix)
install -m 644 install-message.txt $(prefix)/install-message.txt
@cat install-message.txt
uninstall: subdirs
test:
$(MAKE) -C ./test $(MAKEFLAGS) $(MAKECMDGOALS)
quicktest:
$(MAKE) -C ./test $(MAKEFLAGS) $(MAKECMDGOALS)
test-libstdcl:
$(MAKE) -C ./test/test_stdcl $(MAKEFLAGS) test
test-libcoprthr:
$(MAKE) -C ./test/test_libcoprthr $(MAKEFLAGS) test
test-CLETE:
$(MAKE) -C ./test/test_CLETE $(MAKEFLAGS) test
quicktest-libstdcl:
$(MAKE) -C ./test/test_stdcl $(MAKEFLAGS) quicktest
quicktest-libcoprthr:
$(MAKE) -C ./test/test_libcoprthr $(MAKEFLAGS) quicktest