# $Id: Makefile 491 2012-07-02 05:05:21Z elkner $
#MAKEFILESUFFIX = .solaris
default: all
# avoid the chicken and egg problem - standard stuff
CONF:sh = if [ -r config.mk ]; then echo "config.mk" ; else echo '/dev/null' ; fi
include $(CONF)
SUBDIRS = src
CONFIG_H = configure.h
include Makefile.master$(MAKEFILESUFFIX)
.LOCAL .PARALLEL: config tgz
config: $(CONFIG_H)
.PARALLEL all: $(SUBDIRS)
CLOBBERFILES += $(CONFIG_H) pkginfo.lnf prototype.* lnfpkg.*
$(CONFIG_H) $(MAKECONFIG): Makefile$(MAKEFILESUFFIX)
@JOBS=$(JOBS:sh) ; \
SAVPATH="$${PKG_CONFIG_PATH:-.}" && \
CFGPATH="$(PKGCONFIGPATH)" && \
export PKG_CONFIG_PATH="$${CFGPATH// /:}:$$SAVPATH" && \
GINC=$$($(PKGCONFIG) --cflags glib-2.0) && \
GLIB=$$($(PKGCONFIG) --libs glib-2.0) \
CFGPATH="$(PKGCONFIGPATH64)" && \
export PKG_CONFIG_PATH="$${CFGPATH// /:}:$${SAVPATH}" && \
GINC64=$$($(PKGCONFIG) --cflags glib-2.0) && \
GLIB64=$$($(PKGCONFIG) --libs glib-2.0) ; \
$(ECHO) "Configuring $$JOBS parallel dmake jobs per default" ; \
$(PRINTF) "DMAKE_MAX_JOBS = $$JOBS\n\
C99MODE = \$$(C99_ENABLE)\n\
# GLIB\n\
GLIB_I = $$GINC\n\
GLIB_L = $$GLIB\n\
GLIB_I64 = $$GINC64\n\
GLIB_L64 = $$GLIB64\n\
GLIB_INCLUDES = \$$(GLIB_I\$$(BT:32=))\n\
GLIB_LIBS = \$$(GLIB_L\$$(BT:32=))\n" \
>> $(MAKECONFIG) && \
$(ECHO) "" >$@