libk  Diff

Differences From Artifact [eb2aedd9b1]:

To Artifact [4d2e5850b0]:


     9      9   headers = $(wildcard *.h) $(gen-headers) $(patsubst %.m,%,$(wildcard *.h.m))
    10     10   
    11     11   tools    = $(filter     %.exe.c,   $(src))
    12     12   nontools = $(filter-out %.exe.c,   $(src))
    13     13   cobjects = $(filter     %.c,       $(nontools))
    14     14   sobjects = $(filter %.${TARGET}.s, $(nontools))
    15     15   
    16         -gpp = gpp
    17     16   cflags = -std=c11 -isystem ${OUT} -fPIC -nostdlib ${COMPLIB} -L${OUT}
    18     17   
    19     18   m-env = atom_target_arch=${ARCH}
    20     19   m-env += atom_target_os=${OS}
    21     20   ifneq (${BITS},) #!!! ifdef does NOT work with environment variables
    22     21       m-env += atom_target_bits=${BITS}
    23     22   endif
    24     23   m-env += target_posix=${POSIX}
    25     24   m-env += target_unix=${UNIX}
    26     25   
    27         -m-grammar = $(file < ${TMP}/precomp.g)
    28         -m-comp = $(gpp) $(m-grammar) $(m-env:%=-D%)
           26  +m-comp = ${m4} $(m-env:%=-D%)
    29     27   
    30     28   obj: $(cobjects:%.c=${OUT}/$(mod).%.o) \
    31     29   	 $(sobjects:%.s=${OUT}/$(mod).%.o)
    32     30   tool: $(tools:%.exe.c=${OUT}/$(mod).%) \
    33     31   	  ${OUT}/libk.a
    34     32   
    35     33   def: $(headers:%=${OUT}/k/%)
................................................................................
    38     36   	@echo src = $(src)
    39     37   	@echo tools = $(tools)
    40     38   	@echo TARGET = ${TARGET}
    41     39   	@echo cobjects = $(cobjects)
    42     40   	@echo sobjects = $(sobjects)
    43     41   	@echo headers = $(headers)
    44     42   	@echo m-comp = $(m-comp)
    45         -	@echo m-grammar = $(m-grammar)
    46     43   	@echo m-env = $(m-env) "$(m-env:%=-D%)"
    47     44   	@echo mod = $(mod)
    48     45   
    49     46   ${OUT}/k/%.h: %.h.m
    50     47   	$(m-comp) $< > $@
    51     48   
    52     49   .PRECIOUS: ${TMP}/$(mod).%