comparison Makefile @ 519:724bcc4508bc

Add SETSTR/INCLUDESTR for some basic code building It seemed useful to have the ability to build up a variable containing arbitrary text and then to be able to include that in the assembly process like an include file. So add, undocumented for now, the following: SETTSTR varname="string" INCLUDESTSR "string" "string" must be enclosed in double quotes and may contain most of the usual escape sequences (\t, \r, etc.) as well as %(varname) to interpolate a variable value. To use it to create assembleable source code, you need to make sure it creates lines (ended by either \r or \n) with appropriate whitespace in appropriate places.
author William Astle <lost@l-w.ca>
date Sun, 19 Dec 2021 17:01:42 -0700
parents 17fa03d69df3
children 1fa6eca684e5
comparison
equal deleted inserted replaced
518:b530ff19f7c0 519:724bcc4508bc
64 lwar_srcs := add.c extract.c list.c lwar.c main.c remove.c replace.c 64 lwar_srcs := add.c extract.c list.c lwar.c main.c remove.c replace.c
65 lwar_srcs := $(addprefix lwar/,$(lwar_srcs)) 65 lwar_srcs := $(addprefix lwar/,$(lwar_srcs))
66 66
67 lwlib_srcs := lw_alloc.c lw_realloc.c lw_free.c lw_error.c lw_expr.c \ 67 lwlib_srcs := lw_alloc.c lw_realloc.c lw_free.c lw_error.c lw_expr.c \
68 lw_stack.c lw_string.c lw_stringlist.c lw_cmdline.c lw_strbuf.c \ 68 lw_stack.c lw_string.c lw_stringlist.c lw_cmdline.c lw_strbuf.c \
69 lw_strpool.c 69 lw_strpool.c lw_dict.c
70 lwlib_srcs := $(addprefix lwlib/,$(lwlib_srcs)) 70 lwlib_srcs := $(addprefix lwlib/,$(lwlib_srcs))
71 71
72 lwlink_srcs := main.c lwlink.c readfiles.c expr.c script.c link.c output.c map.c 72 lwlink_srcs := main.c lwlink.c readfiles.c expr.c script.c link.c output.c map.c
73 lwobjdump_srcs := objdump.c 73 lwobjdump_srcs := objdump.c
74 lwlink_srcs := $(addprefix lwlink/,$(lwlink_srcs)) 74 lwlink_srcs := $(addprefix lwlink/,$(lwlink_srcs))
76 76
77 lwasm_srcs := cycle.c debug.c input.c insn_bitbit.c insn_gen.c insn_indexed.c \ 77 lwasm_srcs := cycle.c debug.c input.c insn_bitbit.c insn_gen.c insn_indexed.c \
78 insn_inh.c insn_logicmem.c insn_rel.c insn_rlist.c insn_rtor.c insn_tfm.c \ 78 insn_inh.c insn_logicmem.c insn_rel.c insn_rlist.c insn_rtor.c insn_tfm.c \
79 instab.c list.c lwasm.c macro.c main.c os9.c output.c pass1.c pass2.c \ 79 instab.c list.c lwasm.c macro.c main.c os9.c output.c pass1.c pass2.c \
80 pass3.c pass4.c pass5.c pass6.c pass7.c pragma.c pseudo.c section.c \ 80 pass3.c pass4.c pass5.c pass6.c pass7.c pragma.c pseudo.c section.c \
81 struct.c symbol.c symdump.c unicorns.c 81 strings.c struct.c symbol.c symdump.c unicorns.c
82 lwasm_srcs := $(addprefix lwasm/,$(lwasm_srcs)) 82 lwasm_srcs := $(addprefix lwasm/,$(lwasm_srcs))
83 83
84 lwasm_objs := $(lwasm_srcs:.c=.o) 84 lwasm_objs := $(lwasm_srcs:.c=.o)
85 lwlink_objs := $(lwlink_srcs:.c=.o) 85 lwlink_objs := $(lwlink_srcs:.c=.o)
86 lwar_objs := $(lwar_srcs:.c=.o) 86 lwar_objs := $(lwar_srcs:.c=.o)