File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed
Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ MKDIR_P = mkdir -p
2+ RM = rm
3+ INSTALL = install
4+
5+ CC ?= gcc
6+ CFLAGS = -std=gnu99 -O2 -Wall -Wshadow -Isrc
7+ LDFLAGS = $(CFLAGS )
8+
9+ PREFIX = /usr/local
10+ LIBDIR = $(PREFIX ) /lib64
11+ INCDIR = $(PREFIX ) /include
12+
13+ libfathom.so : obj/tbprobe.o
14+ $(CC ) $(LDFLAGS ) -shared $^ -o $@
15+
16+ obj/tbprobe.o : src/tbprobe.c src/tbchess.c src/stdendian.h src/tbprobe.h
17+ @$(MKDIR_P ) obj
18+ $(CC ) $(CFLAGS ) -fPIC -c $< -o $@
19+
20+ clean :
21+ $(RM ) -f libfathom.so
22+ $(RM ) -rf obj
23+
24+ install : libfathom.so
25+ $(MKDIR_P ) $(DESTDIR )$(LIBDIR )
26+ $(INSTALL ) -m 0644 libfathom.so $(DESTDIR )$(LIBDIR )
27+ $(INSTALL ) -m 0644 src/{stdendian,tbconfig,tbprobe}.h $(DESTDIR )$(INCDIR )
28+
29+ uninstall :
30+ $(RM ) -f $(DESTDIR )$(LIBDIR ) /libfathom.so
31+ $(RM ) -f $(DESTDIR )$(INCDIR ) /{stdendian,tbconfig,tbprobe}.h
32+
33+ .PHONY : clean install uninstall
Original file line number Diff line number Diff line change 1212Fathom is compilable under either C99 or C++ and supports a variety of
1313platforms, including at least Windows, Linux, and MacOS.
1414
15+ Building the library
16+ --------------------
17+ It is possible to build and install Fathom as a shared library on Unix-like
18+ systems. Simply run the commands
19+
20+ make
21+ make install
22+
23+ in the top level directory.
24+
1525Tool
1626----
1727
You can’t perform that action at this time.
0 commit comments