# This makefile manages a build environment targeting native platforms with gcc
# and web platforms with either emscripten or binaryen (js or wasm).
################################################################################
-# Each .c file is automatically compiled into an environment-dependent object
+# Each .c file is autopresidential debate california timematically compiled into an environment-dependent object
# file of compiler-specific format (.o for gcc, .bc for llvm/emcc/em++).
################################################################################
default: all
# Source languages handled by this build system
LANGS := c cpp go
# Source-to-source languages handled by this build system
-SLANGS := y
+SLANGS := y rl
# Language-specific compilers and flags passed in from environment
c_C := $(strip $(notdir $(CC)))
c_FLAGS := $(strip $(CFLAGS)) -I.
go_C := gccgo
go_FLAGS := $(c_FLAGS)
# Source to source languages
+# Bison
y_C := bison
y_FLAGS := -d
y_STEM := tab
y_TRG := c h
+# Ragel
+rl_C := ragel
+rl_FLAGS := -C
+rl_TRG := c
# Compiler-specific associations. Each compiler has a binary object suffix
# (OBJ), an archiver (AR), and an archiver object suffix (AROBJ). Each compiler
# may optionally have defined a linker (LD), and a binary output suffix (OUT).
$(eval DRIVER_DBGTARG := $(DRIVER_TARG_DIR)$(basename $(notdir $(DRIVER_TARG)))-d$($2_OUT))
$(eval SCRUB_TARGETS += $(DRIVER_DBGTARG))
$(eval MAKE_DIRS += $(DRIVER_TARG_DIR).$($2_DBG)/)
-$(DRIVER_DBGTARG): $(DRIVER_DBGDEPS) | $(DRIVER_TARG_DIR).$($2_DBG)/
+$(DRIVER_DBGTARG): $(DRIVER_DBGDEPS) | $(DRIVER_TARG_DIR)
$($2_C) $($2_FLAGS) $(DRIVER_DBGSRC) -o $$@
# Make a rule to run this driver after building
$(DRIVER_NAME)-run: $(DRIVER_TARG)