forked from jviki/dtree
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (25 loc) · 668 Bytes
/
Makefile
File metadata and controls
36 lines (25 loc) · 668 Bytes
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
CC = gcc
AR = ar
CFLAGS = -std=gnu99 -Wall -pedantic -Wextra -g -fPIC
prefix=/usr/local
Q ?= @
all: libdtree.a libdtree.so
libdtree.a: dtree_error.o dtree_procfs.o dtree.o bcd_arith.o
$(Q) $(AR) rcs $@ $^
libdtree.so: dtree_error.o dtree_procfs.o dtree.o bcd_arith.o
$(Q) $(CC) -shared -o $@ $^
busio: busio.o
$(CC) $(LDFLAGS) $^ -L. -ldtree -o $@
busio.o: busio.c
lua-test:
$(CC) -o lua-test -DTEST lua_dtree.c -llua -L. -ldtree
clean:
$(Q) $(RM) *.o
distclean: clean
$(Q) $(RM) libdtree.a
$(Q) $(RM) libdtree.so
$(Q) $(RM) busio
install: all
install -m 0644 libdtree.* $(prefix)/lib
install -m 0644 dtree.h $(prefix)/include
.PHONY: install