libk  makerule at [0a42ee4e26]

File legacy/makerule artifact 9a8f61d2ca part of check-in 0a42ee4e26


#- makerule
# this file contains definitions shared between modmake and
# the top-leve makefile
# vim: ft=make

ARCH ?= ${ARCH}
BITS ?= ${BITS}
OS ?= ${OS}

POSIX ?= ${POSIX}
UNIX ?= ${UNIX}

ROOT ?= ${ROOT}
TMP ?= ${TMP}
OUT ?= ${OUT}

m4 ?= ${m4}

cflags = -std=c11 -isystem $(OUT) -isystem $(TMP) -isystem $(ROOT)/arch -fPIC -nostdlib $(COMPLIB) -L$(OUT)

m-env = atom_target_arch=$(ARCH)
m-env += atom_target_os=$(OS)
ifneq ($(BITS),) #!!! ifdef does NOT work with environment variables
    m-env += atom_target_bits=$(BITS)
endif
m-env += target_posix=$(POSIX)
m-env += target_unix=$(UNIX)

m-comp = $(m4) $(m-env:%=-D%)