-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuntils.mk
34 lines (28 loc) · 1017 Bytes
/
buntils.mk
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
TARGET := libbuntils.so
SRCDIR := buntils
BUILDDIR := bin
OBJDIR := bin/obj
C_SRCS := $(wildcard $(SRCDIR)/*.c)
CXX_SRCS := $(wildcard $(SRCDIR)/*.cpp)
INCLUDE_DIRS := include
LIBRARY_DIRS :=
LIBRARIES := rt
CPPFLAGS += -fPIC -D BSS_UTIL_EXPORTS -std=c++20 -DLIBICONV_PLUG -Wall -Wshadow -Wno-attributes -Wno-unknown-pragmas -Wno-reorder -Wno-missing-braces -Wno-unused-function -Wno-char-subscripts -fsanitize=signed-integer-overflow -fuse-ld=gold -Wno-class-memaccess
LDFLAGS += -shared
include base.mk
distclean:
@- $(RM) $(OBJS)
@- $(RM) -r $(OBJDIR)
PREFIX = /usr
.PHONY: install
install:
test -d $(PREFIX) || mkdir $(PREFIX)
test -d $(PREFIX)/lib || mkdir $(PREFIX)/lib
test -d $(PREFIX)/include || mkdir $(PREFIX)/include
test -d $(PREFIX)/include/$(SRCDIR) || mkdir $(PREFIX)/include/$(SRCDIR)
cp $(BUILDDIR)/$(TARGET) $(PREFIX)/lib/$(TARGET)
cp include/$(SRCDIR)/*.h $(PREFIX)/include/$(SRCDIR)/
.PHONY: uninstall
uninstall:
rm -f $(PREFIX)/lib/$(TARGET)
rm -f -r $(PREFIX)/include/$(SRCDIR)