forked from Beckhoff/ADS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (23 loc) · 883 Bytes
/
Makefile
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
prefix ?= /usr
BINARY = build/adstool
TCBINARY = build/tcadstool
LIBRARY = build/libAdsLib.a
MANPAGE = doc/build/man/adstool.1
$(BINARY) $(TCBINARY): build
ninja -C $(@D)
$(MANPAGE): $(DOCFILES)
make -C doc/ man
build:
meson setup $@ -Dtcadsdll_include=/usr/include -Dtcadsdll_lib=/usr/lib
install: $(BINARY) $(TCBINARY) $(MANPAGE)
install --mode=755 -D $(BINARY) "$(DESTDIR)$(prefix)/bin/$(notdir $(BINARY))"
install --mode=755 -D $(TCBINARY) "$(DESTDIR)$(prefix)/bin/$(notdir $(TCBINARY))"
install --mode=755 -D $(LIBRARY) "$(DESTDIR)$(prefix)/lib/$(notdir $(LIBRARY))"
install --mode=755 -D $(MANPAGE) "$(DESTDIR)$(prefix)/share/man/man1/$(notdir $(MANPAGE))"
find AdsLib -type f -name "*.h" -exec install --mode=644 -D {} "$(DESTDIR)$(prefix)/include/{}" \;
uncrustify:
./tools/run-uncrustify.sh format
clean:
rm -rf build
rm -rf doc/build
rm -rf example/build