File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-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
You can’t perform that action at this time.
0 commit comments