forked from acozzette/BUSE
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (19 loc) · 878 Bytes
/
Makefile
File metadata and controls
26 lines (19 loc) · 878 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
TARGET := busexmp loopback pythonbd
LIBOBJS := buse.o
OBJS := $(TARGET:=.o) $(LIBOBJS)
STATIC_LIB := libbuse.a
CC := /usr/bin/gcc
CFLAGS := -g -pedantic -Wall -Wextra -std=c99 -I/usr/include/python3.5m -I/usr/include/python3.5m -Wno-unused-result -Wsign-compare -g -fstack-protector-strong -Wformat -Werror=format-security -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
LDFLAGS := -L. -lbuse -L/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu -L/usr/lib -lpython3.5m -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
.PHONY: all clean
all: $(TARGET)
$(TARGET): %: %.o $(STATIC_LIB)
$(CC) -o $@ $< $(LDFLAGS)
$(TARGET:=.o): %.o: %.c buse.h
$(CC) $(CFLAGS) -o $@ -c $<
$(STATIC_LIB): $(LIBOBJS)
ar rcu $(STATIC_LIB) $(LIBOBJS)
$(LIBOBJS): %.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<
clean:
rm -f $(TARGET) $(OBJS) $(STATIC_LIB)