-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
75 lines (58 loc) · 3.03 KB
/
Makefile
File metadata and controls
75 lines (58 loc) · 3.03 KB
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
UNAME:= $(shell uname -s)
ifeq ($(UNAME),Darwin)
SHLIB=dylib
else
SHLIB=so
endif
# enable use of clang
CXX ?= g++
SUBDIRS= util numsg ifdh
all:
for d in $(SUBDIRS); do ([ -d $$d ] && cd $$d && make $@); done
clean:
for d in $(SUBDIRS); do ([ -d $$d ] && cd $$d && make $@); done
rm -rf build_art
test:
cd tests && python TestSuite.py
new_version:
git commit -am "version $(VERSION)"
git tag $(VERSION)
cd util && make ifdh_version.h
cd fife_wda && make wda_version.h
git commit -am "version $(VERSION)"
git tag --force $(VERSION)
install: install-headers install-libs install-cmake
install-libs: all
rm -rf $(DESTDIR)lib
test -d $(DESTDIR)lib || mkdir -p $(DESTDIR)lib && (cp [inu]*/*.{${SHLIB},a} $(DESTDIR)lib || cp [inu]*/*.{${SHLIB},a} $(DESTDIR)lib)
test -d $(DESTDIR)lib/python || mkdir -p $(DESTDIR)lib/python
cp ifdh/python/ifdh.$(SHLIB) $(DESTDIR)lib/python
#cp ifdh/python/ifdh.py $(DESTDIR)lib/python
test -d $(DESTDIR)bin || mkdir -p $(DESTDIR)bin
cp ifdh/ifdh $(DESTDIR)bin
[ -r ifdh/ifdh_copyback.sh ] && cp ifdh/ifdh_copyback.sh $(DESTDIR)bin || cp ../ifdh/ifdh_copyback.sh $(DESTDIR)bin
[ -r ifdh/www_cp.sh ] && cp ifdh/www_cp.sh $(DESTDIR)bin || cp ../ifdh/www_cp.sh $(DESTDIR)bin
[ -r ifdh/xrdwrap.sh ] && cp ifdh/xrdwrap.sh $(DESTDIR)bin || cp ../ifdh/xrdwrap.sh $(DESTDIR)bin
[ -r ifdh/decode_token.sh ] && cp ifdh/decode_token.sh $(DESTDIR)bin || cp ../ifdh/decode_token.sh $(DESTDIR)bin
[ -r ifdh/auth_session.sh ] && cp ifdh/auth_session.sh $(DESTDIR)bin || cp ../ifdh/auth_session.sh $(DESTDIR)bin
install-headers:
rm -rf $(DESTDIR)inc
test -d $(DESTDIR)inc || mkdir -p $(DESTDIR)inc && cp [finu][^n]*/*.h $(DESTDIR)inc
install-cmake:
test -d $(DESTDIR)lib/ifdhc/cmake || mkdir -p $(DESTDIR)lib/ifdhc/cmake
cp ups/Findifdhc.cmake $(DESTDIR)lib/ifdhc/cmake
32bit:
ARCH="-m32 $(ARCH)" make all install
withart:
ARCH="-g -std=c++14 $(ARCH)" make all
distrib:
mkdir src; cp ifbeam/*.[ch]* [nuf]*/[^d]*.[ch]* src ; mv src/ifbeam.c src/ifbeam_c.c; tar czvf nucondb-client.tgz src; rm -rf src
[ -d Linux* ] || tar czvf ifdhc.tar.gz Makefile bin lib/libifd* lib/python inc/ifdh* inc/[uSW]* inc/num* util ifdh numsg tests ups
[ -d Linux* ] && tar czvf ifdhc.tar.gz Makefile Linux*/bin Linux*/lib/libifd* Linux*/lib/python inc/ifdh* inc/[uSW]* inc/num* util ifdh numsg tests ups || true
[ -d Linux* ] || tar czvf ifbeam.tar.gz Makefile ifbeam [uf]*/*.[ch]* [iuf]*/Makefile lib/libifb* inc/ifb* inc/[uwW]* ups `test -r inc/IFBeam_service.h && echo inc/IFBeam_service.h lib/*Beam*`
[ -d Linux* ] && tar czvf ifbeam.tar.gz Makefile ifbeam [uf]*/*.[ch]* [iuf]*/Makefile Linux*/lib/libifb* inc/ifb* inc/[uwW]* ups `test -r inc/IFBeam_service.h && echo inc/IFBeam_service.h Linux*/lib/*Beam*` || true
ifdh.cfg: util/ifdh_version.h
# update version in ifdh.cfg from util/ifdh_version.h
eval set : \\`cat util/ifdh_version.h`; v="$$4"; printf "/^version=/s/=.*/=$$v/\nw\nq\n"| ed $@
setup.py: util/ifdh_version.h
set -x; eval set : \\`cat util/ifdh_version.h`; v="$$4"; printf "/^ *version=/s/=.*/='$$v',/\nw\nq\n"| ed $@