| 
									
										
										
										
											2018-07-24 15:28:04 -04:00
										 |  |  | .PHONY: all install clean distclean configure | 
					
						
							| 
									
										
										
										
											2018-07-16 16:08:20 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | .NOTPARALLEL: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | include ../versions.mak | 
					
						
							|  |  |  | export JANSSON_DIR := $(shell pwd -P) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | SPECIAL_TARGETS := | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ifneq ($(findstring configure,$(MAKECMDGOALS)),) | 
					
						
							|  |  |  | # Run from $(ASTTOPDIR)/configure
 | 
					
						
							|  |  |  |     SPECIAL_TARGETS += configure | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ifeq ($(findstring clean,$(MAKECMDGOALS)),clean) | 
					
						
							|  |  |  | # clean or distclean
 | 
					
						
							|  |  |  |     SPECIAL_TARGETS += clean | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ifeq ($(findstring uninstall,$(MAKECMDGOALS)),uninstall) | 
					
						
							|  |  |  |     SPECIAL_TARGETS += uninstall | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ifneq ($(wildcard ../../makeopts),) | 
					
						
							|  |  |  |     include ../../makeopts | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ifeq ($(SPECIAL_TARGETS),) | 
					
						
							|  |  |  | # Run locally or from $(ASTTOPDIR)/Makefile.  All include files should be present
 | 
					
						
							|  |  |  |     ifeq ($(wildcard ../../makeopts),) | 
					
						
							|  |  |  |         $(error ASTTOPDIR/configure hasn't been run) | 
					
						
							|  |  |  |     endif | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     ifeq ($(JANSSON_BUNDLED),yes) | 
					
						
							|  |  |  |         ifneq ($(wildcard ../../menuselect.makeopts),) | 
					
						
							|  |  |  |             include ../../menuselect.makeopts | 
					
						
							|  |  |  |         else | 
					
						
							|  |  |  |             $(warning ASTTOPDIR/menuselect hasn't been run yet.  Can't find debug options.) | 
					
						
							|  |  |  |         endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-24 15:28:04 -04:00
										 |  |  |         all: dest/include/jansson.h | 
					
						
							| 
									
										
										
										
											2018-07-16 16:08:20 -04:00
										 |  |  |     else | 
					
						
							| 
									
										
										
										
											2018-07-24 15:28:04 -04:00
										 |  |  |         all: | 
					
						
							| 
									
										
										
										
											2018-07-16 16:08:20 -04:00
										 |  |  |     endif | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | include ../../Makefile.rules | 
					
						
							|  |  |  | include ../Makefile.rules | 
					
						
							|  |  |  | include Makefile.rules | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-03 12:31:06 -06:00
										 |  |  | OPTIMIZE_CFLAGS = -g3 | 
					
						
							|  |  |  | ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),) | 
					
						
							|  |  |  |     OPTIMIZE_CFLAGS += $(OPTIMIZE) | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-16 16:08:20 -04:00
										 |  |  | ECHO_PREFIX := $(ECHO_PREFIX) echo '[jansson] ' | 
					
						
							|  |  |  | SHELL_ECHO_PREFIX := echo '[jansson] ' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-24 15:28:04 -04:00
										 |  |  | dest/include/jansson.h: source/config.status | 
					
						
							| 
									
										
										
										
											2018-07-16 16:08:20 -04:00
										 |  |  | 	$(ECHO_PREFIX) Building bundled jansson. | 
					
						
							| 
									
										
										
										
											2018-07-25 08:34:54 -04:00
										 |  |  | 	$(CMD_PREFIX) (cd source; make $(REALLY_QUIET)) | 
					
						
							| 
									
										
										
										
											2018-09-10 23:28:04 -04:00
										 |  |  | 	$(CMD_PREFIX) (cd source; make install DESTDIR= $(REALLY_QUIET)) | 
					
						
							| 
									
										
										
										
											2018-07-16 16:08:20 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | .DELETE_ON_ERROR: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | $(DOWNLOAD_DIR)/$(TARBALL_FILE): ../versions.mak | 
					
						
							|  |  |  | 	$(CMD_PREFIX) ($(TARBALL_EXISTS) && $(TARBALL_VERIFY) && touch $@) || (rm -rf $@ ;\
 | 
					
						
							|  |  |  | 	$(TARBALL_DOWNLOAD)) || (rm -rf $@ ;\
 | 
					
						
							|  |  |  | 	$(SHELL_ECHO_PREFIX) Retrying download ; $(TARBALL_DOWNLOAD)) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | source/.unpacked: $(DOWNLOAD_DIR)/$(TARBALL_FILE) | 
					
						
							|  |  |  | 	$(CMD_PREFIX) $(TARBALL_VERIFY) || (rm -rf $@ ;\
 | 
					
						
							|  |  |  | 	$(SHELL_ECHO_PREFIX) Retrying download ; $(TARBALL_DOWNLOAD)) | 
					
						
							|  |  |  | 	$(ECHO_PREFIX) Unpacking $< | 
					
						
							|  |  |  | 	-@rm -rf source jansson-*/ >/dev/null 2>&1 | 
					
						
							|  |  |  | 	$(CMD_PREFIX) $(TAR) -xjf $< | 
					
						
							|  |  |  | 	@mv jansson-$(JANSSON_VERSION) source | 
					
						
							|  |  |  | 	$(ECHO_PREFIX) Applying patches "$(realpath patches)" "$(realpath .)/source" | 
					
						
							|  |  |  | 	$(CMD_PREFIX) ../apply_patches $(QUIET_CONFIGURE) "$(realpath patches)" "$(realpath .)/source" | 
					
						
							|  |  |  | 	-@touch source/.unpacked | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .rebuild_needed: $(wildcard ../../.lastclean) | 
					
						
							|  |  |  | 	$(ECHO_PREFIX) Rebuilding | 
					
						
							|  |  |  | 	$(CMD_PREFIX) $(MAKE) clean $(REALLY_QUIET) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | source/config.status: source/.unpacked Makefile.rules .rebuild_needed | 
					
						
							|  |  |  | 	$(ECHO_PREFIX) Configuring | 
					
						
							| 
									
										
										
										
											2019-02-04 06:09:57 -07:00
										 |  |  | 	$(CMD_PREFIX) (cd source ; ./configure $(QUIET_CONFIGURE) $(JANSSON_CONFIG_OPTS) --disable-shared \
 | 
					
						
							| 
									
										
										
										
											2019-05-03 12:31:06 -06:00
										 |  |  | 		--enable-static --prefix=$(JANSSON_DIR)/dest --libdir=$(JANSSON_DIR)/dest/lib CFLAGS="$(OPTIMIZE_CFLAGS)") | 
					
						
							| 
									
										
										
										
											2018-07-16 16:08:20 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | configure: source/config.status | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-24 15:28:04 -04:00
										 |  |  | install: | 
					
						
							| 
									
										
										
										
											2018-07-16 16:08:20 -04:00
										 |  |  | uninstall: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | clean: | 
					
						
							|  |  |  | 	$(ECHO_PREFIX) Cleaning | 
					
						
							|  |  |  | 	+-$(CMD_PREFIX) test -d source dest && $(SUBMAKE) -C source clean || : | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | distclean: | 
					
						
							|  |  |  | 	$(ECHO_PREFIX) Distcleaning | 
					
						
							|  |  |  | 	-$(CMD_PREFIX) rm -rf source jansson-*.tar.bz2 .rebuild_needed |