First milestone of replacing the build system.
--HG-- branch : dtrg-buildsystem rename : lang/cem/cpp.ansi/Parameters => lang/cem/cpp.ansi/parameters.h
This commit is contained in:
23
modules/src/alloc/build.mk
Normal file
23
modules/src/alloc/build.mk
Normal file
@@ -0,0 +1,23 @@
|
||||
D := modules/src/alloc
|
||||
|
||||
define build-liballoc-impl
|
||||
$(call reset)
|
||||
$(call cfile, $D/Malloc.c)
|
||||
$(call cfile, $D/Salloc.c)
|
||||
$(call cfile, $D/Srealloc.c)
|
||||
$(call cfile, $D/Realloc.c)
|
||||
$(call cfile, $D/botch.c)
|
||||
$(call cfile, $D/clear.c)
|
||||
$(call cfile, $D/st_alloc.c)
|
||||
$(call cfile, $D/std_alloc.c)
|
||||
$(call cfile, $D/No_Mem.c)
|
||||
$(call clibrary, $(LIBDIR)/liballoc.a)
|
||||
LIBALLOC := $o
|
||||
|
||||
$(call reset)
|
||||
$(eval q := $D/alloc.h)
|
||||
$(call copyto, $(INCDIR)/alloc.h)
|
||||
endef
|
||||
|
||||
$(eval $(build-liballoc-impl))
|
||||
|
||||
89
modules/src/em_code/build.mk
Normal file
89
modules/src/em_code/build.mk
Normal file
@@ -0,0 +1,89 @@
|
||||
D := modules/src/em_code
|
||||
|
||||
# $1 = capital letter for library specialisation (E or K)
|
||||
# $2 = lowercase letter for library specialisation (e or k)
|
||||
# $3 = cflags that specalise this library
|
||||
|
||||
define build-em_code-impl
|
||||
$(call reset)
|
||||
$(eval cflags += $3)
|
||||
$(eval objdir := $D/$1)
|
||||
$(call cfile, $D/bhcst.c)
|
||||
$(call cfile, $D/bhdlb.c)
|
||||
$(call cfile, $D/bhdnam.c)
|
||||
$(call cfile, $D/bhfcon.c)
|
||||
$(call cfile, $D/bhicon.c)
|
||||
$(call cfile, $D/bhilb.c)
|
||||
$(call cfile, $D/bhpnam.c)
|
||||
$(call cfile, $D/bhucon.c)
|
||||
$(call cfile, $D/crcst.c)
|
||||
$(call cfile, $D/crdlb.c)
|
||||
$(call cfile, $D/crdnam.c)
|
||||
$(call cfile, $D/crxcon.c)
|
||||
$(call cfile, $D/crilb.c)
|
||||
$(call cfile, $D/crpnam.c)
|
||||
$(call cfile, $D/crscon.c)
|
||||
$(call cfile, $D/cst.c)
|
||||
$(call cfile, $D/dfdlb.c)
|
||||
$(call cfile, $D/dfdnam.c)
|
||||
$(call cfile, $D/dfilb.c)
|
||||
$(call cfile, $D/dlb.c)
|
||||
$(call cfile, $D/dnam.c)
|
||||
$(call cfile, $D/end.c)
|
||||
$(call cfile, $D/endarg.c)
|
||||
$(call cfile, $D/exc.c)
|
||||
$(call cfile, $D/fcon.c)
|
||||
$(call cfile, $D/getid.c)
|
||||
$(call cfile, $D/icon.c)
|
||||
$(call cfile, $D/ilb.c)
|
||||
$(call cfile, $D/insert.c)
|
||||
$(call cfile, $D/internerr.c)
|
||||
$(call cfile, $D/msend.c)
|
||||
$(call cfile, $D/op.c)
|
||||
$(call cfile, $D/opcst.c)
|
||||
$(call cfile, $D/opdlb.c)
|
||||
$(call cfile, $D/opdnam.c)
|
||||
$(call cfile, $D/opilb.c)
|
||||
$(call cfile, $D/opnarg.c)
|
||||
$(call cfile, $D/oppnam.c)
|
||||
$(call cfile, $D/pnam.c)
|
||||
$(call cfile, $D/pro.c)
|
||||
$(call cfile, $D/pronarg.c)
|
||||
$(call cfile, $D/msstart.c)
|
||||
$(call cfile, $D/psdlb.c)
|
||||
$(call cfile, $D/psdnam.c)
|
||||
$(call cfile, $D/pspnam.c)
|
||||
$(call cfile, $D/scon.c)
|
||||
$(call cfile, $D/ucon.c)
|
||||
$(call cfile, $D/C_out.c)
|
||||
$(call cfile, $D/failed.c)
|
||||
$(call cfile, $D/em.c)
|
||||
|
||||
$(eval $q: $(INCDIR)/em_codeEK.h)
|
||||
|
||||
$(call clibrary, $(LIBDIR)/libem$2.a)
|
||||
$(eval LIBEM$1 := $o)
|
||||
endef
|
||||
|
||||
define build-em_code-header-impl
|
||||
$(OBJDIR)/$D/em_codeEK.h: $D/make.em.gen $D/em.nogen h/em_table
|
||||
@echo MAKE_EM_GEN $$@
|
||||
@mkdir -p $$(dir $$@)
|
||||
$(hide) $D/make.em.gen h/em_table > $$@
|
||||
$(hide) cat $D/em.nogen >> $$@
|
||||
|
||||
$(call reset)
|
||||
$(eval q := $(OBJDIR)/$D/em_codeEK.h)
|
||||
$(eval CLEANABLES += $q)
|
||||
$(call copyto, $(INCDIR)/em_codeEK.h)
|
||||
|
||||
$(eval CLEANABLES += $o)
|
||||
$(eval $o: $(INCDIR)/em_pseu.h)
|
||||
|
||||
endef
|
||||
|
||||
$(eval $(call build-em_code-header-impl))
|
||||
$(eval $(call build-em_code-impl,E,e, -DREADABLE_EM))
|
||||
$(eval $(call build-em_code-impl,K,k, ))
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
they can be written immediately.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <em_path.h>
|
||||
#include <alloc.h>
|
||||
#include "insert.h"
|
||||
|
||||
26
modules/src/em_mes/build.mk
Normal file
26
modules/src/em_mes/build.mk
Normal file
@@ -0,0 +1,26 @@
|
||||
D := modules/src/em_mes
|
||||
|
||||
define build-em_mes-impl
|
||||
$(call reset)
|
||||
$(call cfile, $D/C_ms_err.c)
|
||||
$(call cfile, $D/C_ms_opt.c)
|
||||
$(call cfile, $D/C_ms_emx.c)
|
||||
$(call cfile, $D/C_ms_reg.c)
|
||||
$(call cfile, $D/C_ms_src.c)
|
||||
$(call cfile, $D/C_ms_flt.c)
|
||||
$(call cfile, $D/C_ms_com.c)
|
||||
$(call cfile, $D/C_ms_par.c)
|
||||
$(call cfile, $D/C_ms_ego.c)
|
||||
$(call cfile, $D/C_ms_gto.c)
|
||||
$(call cfile, $D/C_ms_stb.c)
|
||||
$(call cfile, $D/C_ms_std.c)
|
||||
|
||||
$(eval $q: $(INCDIR)/em_codeEK.h)
|
||||
|
||||
$(call clibrary, $(LIBDIR)/libem_mes.a)
|
||||
$(eval LIBEM_MES := $o)
|
||||
endef
|
||||
|
||||
$(eval $(call build-em_mes-impl))
|
||||
|
||||
|
||||
29
modules/src/flt_arith/build.mk
Normal file
29
modules/src/flt_arith/build.mk
Normal file
@@ -0,0 +1,29 @@
|
||||
D := modules/src/flt_arith
|
||||
|
||||
define build-libflt_arith-impl
|
||||
$(call reset)
|
||||
$(call cfile, $D/flt_ar2flt.c)
|
||||
$(call cfile, $D/flt_div.c)
|
||||
$(call cfile, $D/flt_flt2ar.c)
|
||||
$(call cfile, $D/flt_modf.c)
|
||||
$(call cfile, $D/flt_str2fl.c)
|
||||
$(call cfile, $D/flt_cmp.c)
|
||||
$(call cfile, $D/flt_add.c)
|
||||
$(call cfile, $D/b64_add.c)
|
||||
$(call cfile, $D/flt_mul.c)
|
||||
$(call cfile, $D/flt_nrm.c)
|
||||
$(call cfile, $D/b64_sft.c)
|
||||
$(call cfile, $D/flt_umin.c)
|
||||
$(call cfile, $D/flt_chk.c)
|
||||
$(call cfile, $D/split.c)
|
||||
$(call cfile, $D/ucmp.c)
|
||||
$(call clibrary, $(LIBDIR)/libflt_arith.a)
|
||||
LIBFLT_ARITH := $o
|
||||
|
||||
$(call reset)
|
||||
$(eval q := $D/flt_arith.h)
|
||||
$(call copyto, $(INCDIR)/flt_arith.h)
|
||||
endef
|
||||
|
||||
$(eval $(build-libflt_arith-impl))
|
||||
|
||||
14
modules/src/idf/build.mk
Normal file
14
modules/src/idf/build.mk
Normal file
@@ -0,0 +1,14 @@
|
||||
D := modules/src/idf
|
||||
|
||||
define build-libidf-impl
|
||||
$(call reset)
|
||||
$(eval q := $D/idf_pkg.body)
|
||||
$(call copyto, $(INCDIR)/idf_pkg.body)
|
||||
|
||||
$(call reset)
|
||||
$(eval q := $D/idf_pkg.spec)
|
||||
$(call copyto, $(INCDIR)/idf_pkg.spec)
|
||||
endef
|
||||
|
||||
$(eval $(build-libidf-impl))
|
||||
|
||||
20
modules/src/input/build.mk
Normal file
20
modules/src/input/build.mk
Normal file
@@ -0,0 +1,20 @@
|
||||
D := modules/src/input
|
||||
|
||||
define build-libinput-impl
|
||||
$(call reset)
|
||||
$(call cfile, $D/AtEoIF.c)
|
||||
$(call cfile, $D/AtEoIT.c)
|
||||
$(call clibrary, $(LIBDIR)/libinput.a)
|
||||
$(eval LIBINPUT := $o)
|
||||
|
||||
$(call reset)
|
||||
$(eval q := $D/inp_pkg.body)
|
||||
$(call copyto, $(INCDIR)/inp_pkg.body)
|
||||
|
||||
$(call reset)
|
||||
$(eval q := $D/inp_pkg.spec)
|
||||
$(call copyto, $(INCDIR)/inp_pkg.spec)
|
||||
endef
|
||||
|
||||
$(eval $(build-libinput-impl))
|
||||
|
||||
27
modules/src/object/build.mk
Normal file
27
modules/src/object/build.mk
Normal file
@@ -0,0 +1,27 @@
|
||||
D := modules/src/object
|
||||
|
||||
define build-libobject-impl
|
||||
$(call reset)
|
||||
$(call cfile, $D/rd.c)
|
||||
$(call cfile, $D/rd_arhdr.c)
|
||||
$(call cfile, $D/rd_bytes.c)
|
||||
$(call cfile, $D/rd_int2.c)
|
||||
$(call cfile, $D/rd_long.c)
|
||||
$(call cfile, $D/rd_ranlib.c)
|
||||
$(call cfile, $D/rd_unsig2.c)
|
||||
$(call cfile, $D/wr.c)
|
||||
$(call cfile, $D/wr_arhdr.c)
|
||||
$(call cfile, $D/wr_bytes.c)
|
||||
$(call cfile, $D/wr_int2.c)
|
||||
$(call cfile, $D/wr_long.c)
|
||||
$(call cfile, $D/wr_putc.c)
|
||||
$(call cfile, $D/wr_ranlib.c)
|
||||
|
||||
$(eval $q: $(INCDIR)/local.h)
|
||||
|
||||
$(call clibrary, $(LIBDIR)/libobject.a)
|
||||
LIBOBJECT := $o
|
||||
endef
|
||||
|
||||
$(eval $(build-libobject-impl))
|
||||
|
||||
22
modules/src/print/build.mk
Normal file
22
modules/src/print/build.mk
Normal file
@@ -0,0 +1,22 @@
|
||||
D := modules/src/print
|
||||
|
||||
define build-libprint-impl
|
||||
$(call reset)
|
||||
$(call cfile, $D/doprnt.c)
|
||||
$(call cfile, $D/fprint.c)
|
||||
$(call cfile, $D/print.c)
|
||||
$(call cfile, $D/sprint.c)
|
||||
$(call cfile, $D/format.c)
|
||||
|
||||
$(eval $q: $(INCDIR)/system.h)
|
||||
|
||||
$(call clibrary, $(LIBDIR)/libprint.a)
|
||||
LIBPRINT := $o
|
||||
|
||||
$(call reset)
|
||||
$(eval q := $D/print.h)
|
||||
$(call copyto, $(INCDIR)/print.h)
|
||||
endef
|
||||
|
||||
$(eval $(build-libprint-impl))
|
||||
|
||||
19
modules/src/string/build.mk
Normal file
19
modules/src/string/build.mk
Normal file
@@ -0,0 +1,19 @@
|
||||
D := modules/src/string
|
||||
|
||||
define build-libstring-impl
|
||||
$(call reset)
|
||||
$(call cfile, $D/bts2str.c)
|
||||
$(call cfile, $D/btscat.c)
|
||||
$(call cfile, $D/btscmp.c)
|
||||
$(call cfile, $D/btscpy.c)
|
||||
$(call cfile, $D/btszero.c)
|
||||
$(call cfile, $D/long2str.c)
|
||||
$(call cfile, $D/str2bts.c)
|
||||
$(call cfile, $D/str2long.c)
|
||||
$(call cfile, $D/strzero.c)
|
||||
$(call clibrary, $(LIBDIR)/libstring.a)
|
||||
LIBSTRING := $o
|
||||
endef
|
||||
|
||||
$(eval $(build-libstring-impl))
|
||||
|
||||
29
modules/src/system/build.mk
Normal file
29
modules/src/system/build.mk
Normal file
@@ -0,0 +1,29 @@
|
||||
D := modules/src/system
|
||||
|
||||
define build-libsystem-impl
|
||||
$(call reset)
|
||||
$(call cfile, $D/access.c)
|
||||
$(call cfile, $D/break.c)
|
||||
$(call cfile, $D/chmode.c)
|
||||
$(call cfile, $D/close.c)
|
||||
$(call cfile, $D/create.c)
|
||||
$(call cfile, $D/filesize.c)
|
||||
$(call cfile, $D/open.c)
|
||||
$(call cfile, $D/read.c)
|
||||
$(call cfile, $D/remove.c)
|
||||
$(call cfile, $D/stop.c)
|
||||
$(call cfile, $D/system.c)
|
||||
$(call cfile, $D/time.c)
|
||||
$(call cfile, $D/write.c)
|
||||
$(call cfile, $D/seek.c)
|
||||
$(call cfile, $D/rename.c)
|
||||
$(call clibrary, $(LIBDIR)/libsystem.a)
|
||||
LIBSYSTEM := $o
|
||||
|
||||
$(call reset)
|
||||
$(eval q := $D/system.h)
|
||||
$(call copyto, $(INCDIR)/system.h)
|
||||
endef
|
||||
|
||||
$(eval $(build-libsystem-impl))
|
||||
|
||||
Reference in New Issue
Block a user