-
Notifications
You must be signed in to change notification settings - Fork 2
/
GNUmakefile
66 lines (57 loc) · 1.48 KB
/
GNUmakefile
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
65
66
GIT_INFO := $(shell GIT_CEILING_DIRECTORIES=`pwd`/.. git describe --always 2>/dev/null || true)
# For the local development environment
# define your most precious flags in .localflags
-include .localflags
-include .cflags
-include Makefile.pre
ifeq ($(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)
ifeq ($(WITH_LIBRARY),yes)
HAVE_LIBTOOL := $(shell which $(LIBTOOL) >/dev/null && echo yes)
ifeq ($(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
ifeq ($(ALPM),yes)
ENABLE_ALPM := define
CXXFLAGS += `pkg-config libalpm --cflags`
LIBS += `pkg-config libalpm --libs`
endif
ifeq ($(REGEX),yes)
ENABLE_REGEX := define
endif
ifeq ($(THREADS),yes)
ENABLE_THREADS := define
endif
-include Makefile
#ifneq ($(strip $(ALLFLAGS)),$(strip $(?COMPAREFLAGS)))
ifneq ($(strip $(ALLFLAGS)),$(strip $(shell echo $(COMPAREFLAGS))))
.PHONY: .cflags
.cflags:
@echo "ALLFLAGS := $(COMPAREFLAGS)" > .cflags
@echo "OLDCXX := $(CXX)" >> .cflags
else
ifneq ($(OLDCXX),$(CXX))
.PHONY: .cflags
.cflags:
@echo "ALLFLAGS := $(COMPAREFLAGS)" > .cflags
@echo "OLDCXX := $(CXX)" >> .cflags
endif
endif