-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile.in
44 lines (30 loc) · 919 Bytes
/
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
### DO NOT CHANGE
SHELL=bash
GITVERSION=$(shell git describe --tags | sed 's/^v//g')
SEDLIBPATH=$(shell echo ${LIBPATH} | sed 's/\//\\\//g')
prog_install = $(shell ls src | xargs)
lib_install = $(shell ls lib | xargs)
bins=$(addprefix bin/,$(prog_install))
installs_bin=$(addprefix ${BINPATH}/,$(prog_install))
installs_lib=$(addprefix ${LIBPATH}/,$(lib_install))
### makefile core
all : $(bins)
$(bins) : bin
@sed -e "s/SEDMATCHGITVERSION/${GITVERSION}/g" $(subst bin/,src/,$@) | \
sed -e "s/SEDMATCHINSTALLLIB/${SEDLIBPATH}/g" > $@
chmod 755 $@
bin :
mkdir bin
chmod 755 bin
.PHONY : install
install : $(installs_bin) $(installs_lib)
$(installs_bin) : $(bins)
ln -sf $(subst ${BINPATH}/, ${PWD}/bin/, $@) ${BINPATH}
$(installs_lib) :
ln -sf $(subst ${LIBPATH}/, ${PWD}/lib/, $@) ${LIBPATH}
.PHONY : uninstall
uninstall :
rm $(installs_bin) $(installs_lib)
.PHONY : clean
clean :
-rm -R bin