-- $Source$
-- $State$

local d = "modules/src/em_code/"
lib_eme = file (LIBDIR.."libeme.a")
lib_emk = file (LIBDIR.."libemk.a")

local em_codeMK_h = simple {
	outputs = {"%U%-%I%.h"},
	command = {
		d.."make.em.gen etc/em_table "..d.."em.nogen > %out%",
		"cat "..d.."em.nogen >> %out%"
	},
	install = pm.install(HEADERDIR.."em_codeEK.h"),
	
	file (d.."make.em.gen"),
	file ("etc/em_table")
}

local em_cfile = cfile {
	class = "em_cfile",
	dynamicheaders = em_codeMK_h
}

local library_core = group {
	em_cfile (d.."bhcst.c"),
	em_cfile (d.."bhdlb.c"),
	em_cfile (d.."bhdnam.c"),
	em_cfile (d.."bhfcon.c"),
	em_cfile (d.."bhicon.c"),
	em_cfile (d.."bhilb.c"),
	em_cfile (d.."bhpnam.c"),
	em_cfile (d.."bhucon.c"),
	em_cfile (d.."crcst.c"),
	em_cfile (d.."crdlb.c"),
	em_cfile (d.."crdnam.c"),
	em_cfile (d.."crxcon.c"),
	em_cfile (d.."crilb.c"),
	em_cfile (d.."crpnam.c"),
	em_cfile (d.."crscon.c"),
	em_cfile (d.."cst.c"),
	em_cfile (d.."dfdlb.c"),
	em_cfile (d.."dfdnam.c"),
	em_cfile (d.."dfilb.c"),
	em_cfile (d.."dlb.c"),
	em_cfile (d.."dnam.c"),
	em_cfile (d.."end.c"),
	em_cfile (d.."endarg.c"),
	em_cfile (d.."exc.c"),
	em_cfile (d.."fcon.c"),
	em_cfile (d.."getid.c"),
	em_cfile (d.."icon.c"),
	em_cfile (d.."ilb.c"),
	em_cfile (d.."insert.c"),
	em_cfile (d.."internerr.c"),
	em_cfile (d.."msend.c"),
	em_cfile (d.."op.c"),
	em_cfile (d.."opcst.c"),
	em_cfile (d.."opdlb.c"),
	em_cfile (d.."opdnam.c"),
	em_cfile (d.."opilb.c"),
	em_cfile (d.."opnarg.c"),
	em_cfile (d.."oppnam.c"),
	em_cfile (d.."pnam.c"),
	em_cfile (d.."pro.c"),
	em_cfile (d.."pronarg.c"),
	em_cfile (d.."msstart.c"),
	em_cfile (d.."psdlb.c"),
	em_cfile (d.."psdnam.c"),
	em_cfile (d.."pspnam.c"),
	em_cfile (d.."scon.c"),
	em_cfile (d.."ucon.c"),
	em_cfile (d.."C_out.c"),
	em_cfile (d.."failed.c"),
	em_cfile (d.."em.c")
}

module_eme = clibrary {
	CEXTRAFLAGS = "-DREADABLE_EM",
	library_core,
	
	outputs = {"%U%/libeme.a"},
	install = {
		pm.install(LIBDIR.."libeme.a")
	}
}

module_emk = clibrary {
	library_core,
	
	outputs = {"%U%/libemk.a"},
	install = {
		pm.install(LIBDIR.."libemk.a")
	}
}

module_em_code = group {
	module_eme,
	module_emk,
}

-- Revision history
-- $Log$
-- Revision 1.1  2006-07-20 23:18:18  dtrg
-- First version in CVS.
--
