Add testing infrastructure and move out gen nim

This commit is contained in:
Joey Yakimowich-Payne 2018-05-26 12:40:09 +09:00
commit 801658b9ea
23 changed files with 462 additions and 32 deletions

45
generators/nim/Makefile Normal file
View file

@ -0,0 +1,45 @@
TOP=../..
##############################################################################
# Variables
##############################################################################
TARGET=lib
-include $(TOP)/Makefile.config
SRC= generate_nim.ml unit_generate_nim.ml
SYSLIBS= str.cma unix.cma
LIBS=$(TOP)/commons/lib.cma \
$(TOP)/h_program-lang/lib.cma \
INCLUDEDIRS= \
$(TOP)/commons \
$(TOP)/commons_core \
$(TOP)/globals \
$(TOP)/h_program-lang \
$(TOP)/lang_cpp/parsing
##############################################################################
# Generic variables
##############################################################################
-include $(TOP)/Makefile.common
##############################################################################
# Top rules
##############################################################################
all:: $(TARGET).cma
all.opt:: $(TARGET).cmxa
$(TARGET).cma: $(OBJS)
$(OCAMLC) -a -o $(TARGET).cma $(OBJS)
$(TARGET).cmxa: $(OPTOBJS) $(LIBS:.cma=.cmxa)
$(OCAMLOPT) -a -o $(TARGET).cmxa $(OPTOBJS)
$(TARGET).top: $(OBJS) $(LIBS)
$(OCAMLMKTOP) -o $(TARGET).top $(SYSLIBS) $(LIBS) $(OBJS)
clean::
rm -f $(TARGET).top