-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBSDmakefile
64 lines (55 loc) · 1.38 KB
/
BSDmakefile
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
GIT_INFO != GIT_CEILING_DIRECTORIES="`pwd`/.." git describe --always 2>/dev/null || true
.if exists(.localflags)
. include ".localflags"
.endif
.if exists(.cflags)
. include ".cflags"
.endif
.include "Makefile.pre"
.if $(CXX) == clang++
CPPFLAGS+=$(CLANG_FLAGS)
.endif
LIBPKGDEPDB_LA:=
INSTALL_LIB:=
UNINSTALL_LIB:=
LTCXX = $(CXX)
LTLD = $(CXX)
LTOBJECTS = $(OBJECTS)
LTMAIN_OBJ = $(MAIN_OBJ)
LTLIB_OBJ = $(LIB_OBJ)
.if $(WITH_LIBRARY) == yes
HAVE_LIBTOOL != which $(LIBTOOL) >/dev/null && echo yes
.if $(HAVE_LIBTOOL) == yes
LIBPKGDEPDB_LA:=libpkgdepdb.la
INSTALL_LIB:=install-lib
UNINSTALL_LIB:=uninstall-lib
LTCXX = $(LIBTOOL) --mode=compile $(CXX)
LTLD = $(LIBTOOL) --mode=link $(CXX)
LTOBJECTS = $(OBJECTS:.o=.lo)
LTMAIN_OBJ = $(MAIN_OBJ:.o=.lo)
LTLIB_OBJ = $(LIB_OBJ:.o=.lo)
INSTALLTARGETS+=$(INSTALLTARGETS_LIB)
.endif
.endif
.if $(ALPM) == yes
ENABLE_ALPM := define
CXXFLAGS += `pkg-config libalpm --cflags`
LIBS += `pkg-config libalpm --libs`
.endif
.if $(REGEX) == yes
ENABLE_REGEX := define
.endif
.if $(THREADS) == yes
ENABLE_THREADS := define
.endif
.include "Makefile"
.if !defined(ALLFLAGS) || !defined(OLDCXX) \
|| "$(ALLFLAGS)" != "$(COMPAREFLAGS)" \
|| "$(OLDCXX)" != "$(CXX)"
.PHONY: .cflags
# the first echo needs to use single quotes otherwise the .if
# comparisons fail
.cflags:
@echo 'ALLFLAGS := $(COMPAREFLAGS)' > .cflags
@echo "OLDCXX := $(CXX)" >> .cflags
.endif