Debian Codegraph @

third-party/jansson/Makefile

raw symbols SCIP
1 .PHONY: all install clean distclean configure
2
3 .NOTPARALLEL:
4
5 include ../versions.mak
6 export JANSSON_DIR := $(shell pwd -P)
7
8 SPECIAL_TARGETS :=
9
10 ifneq ($(findstring configure,$(MAKECMDGOALS)),)
11 # Run from $(ASTTOPDIR)/configure
12 SPECIAL_TARGETS += configure
13 endif
14
15 ifeq ($(findstring clean,$(MAKECMDGOALS)),clean)
16 # clean or distclean
17 SPECIAL_TARGETS += clean
18 endif
19
20 ifeq ($(findstring uninstall,$(MAKECMDGOALS)),uninstall)
21 SPECIAL_TARGETS += uninstall
22 endif
23
24
25 ifneq ($(wildcard ../../makeopts),)
26 include ../../makeopts
27 endif
28
29 ifeq ($(SPECIAL_TARGETS),)
30 # Run locally or from $(ASTTOPDIR)/Makefile. All include files should be present
31 ifeq ($(wildcard ../../makeopts),)
32 $(error ASTTOPDIR/configure hasn't been run)
33 endif
34
35 ifeq ($(JANSSON_BUNDLED),yes)
36 ifneq ($(wildcard ../../menuselect.makeopts),)
37 include ../../menuselect.makeopts
38 else
39 $(warning ASTTOPDIR/menuselect hasn't been run yet. Can't find debug options.)
40 endif
41
42 all: dist/usr/lib/libjansson.a
43 else
44 all:
45 endif
46 endif
47
48 include ../../Makefile.rules
49 include ../Makefile.rules
50 include Makefile.rules
51
52 OPTIMIZE_CFLAGS = -g3
53 ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),)
54 OPTIMIZE_CFLAGS += $(OPTIMIZE)
55 endif
56
57 ECHO_PREFIX := $(ECHO_PREFIX) echo '[jansson] '
58 SHELL_ECHO_PREFIX := echo '[jansson] '
59
60 dist/usr/lib/libjansson.a: source/config.status
61 $(ECHO_PREFIX) Building bundled jansson.
62 $(CMD_PREFIX) (cd source; make $(REALLY_QUIET))
63 $(CMD_PREFIX) (cd source; make install DESTDIR=$(JANSSON_DIR)/dist $(REALLY_QUIET))
64
65 .DELETE_ON_ERROR:
66
67 $(DOWNLOAD_DIR)/$(TARBALL_FILE): ../versions.mak
68 $(CMD_PREFIX) ($(TARBALL_EXISTS) && $(TARBALL_VERIFY) && touch $@) || (rm -rf $@ ;\
69 $(TARBALL_DOWNLOAD)) || (rm -rf $@ ;\
70 $(SHELL_ECHO_PREFIX) Retrying download ; $(TARBALL_DOWNLOAD))
71
72 source/.unpacked: $(DOWNLOAD_DIR)/$(TARBALL_FILE)
73 $(CMD_PREFIX) $(TARBALL_VERIFY) || (rm -rf $@ ;\
74 $(SHELL_ECHO_PREFIX) Retrying download ; $(TARBALL_DOWNLOAD))
75 $(ECHO_PREFIX) Unpacking $<
76 -@rm -rf source jansson-*/ >/dev/null 2>&1
77 $(CMD_PREFIX) $(TAR) -xjf $<
78 @mv jansson-$(JANSSON_VERSION) source
79 $(ECHO_PREFIX) Applying patches "$(realpath patches)" "$(realpath .)/source"
80 $(CMD_PREFIX) ../apply_patches $(QUIET_CONFIGURE) "$(realpath patches)" "$(realpath .)/source"
81 -@touch source/.unpacked
82
83 .rebuild_needed: $(wildcard ../../.lastclean)
84 $(ECHO_PREFIX) Rebuilding
85 $(CMD_PREFIX) $(MAKE) clean $(REALLY_QUIET)
86
87 source/config.status: source/.unpacked Makefile.rules .rebuild_needed
88 $(ECHO_PREFIX) Configuring
89 $(CMD_PREFIX) (cd source ; ./configure $(QUIET_CONFIGURE) $(JANSSON_CONFIG_OPTS) --disable-shared \
90 --enable-static --prefix=/usr --libdir=/usr/lib CFLAGS="$(OPTIMIZE_CFLAGS) -fPIC")
91
92 configure: source/config.status
93
94 install:
95 uninstall:
96
97 clean:
98 $(ECHO_PREFIX) Cleaning
99 +-$(CMD_PREFIX) rm -rf dist
100 +-$(CMD_PREFIX) test -d source && $(SUBMAKE) -C source clean $(REALLY_QUIET) || :
101
102 distclean:
103 $(ECHO_PREFIX) Distcleaning
104 -$(CMD_PREFIX) rm -rf dist source jansson-*.tar.bz2 .rebuild_needed