X-Git-Url: https://www.kengrimes.com/gitweb/?p=henge%2Fwebcc.git;a=blobdiff_plain;f=src%2FMakefile;h=70f3a9661321eeefd34cf35775abeedd9693d948;hp=83fb20f8c29dc60947af7bc700902799c983c595;hb=6b3c21959f04be6530e8b5bfdc51b38e8f33e8be;hpb=b513e9a11e246deaf305b214f2840475daa0ede2 diff --git a/src/Makefile b/src/Makefile index 83fb20f..70f3a96 100644 --- a/src/Makefile +++ b/src/Makefile @@ -6,14 +6,14 @@ # 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. @@ -25,10 +25,15 @@ cpp_LIBS := $(c_LIBS) 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). @@ -265,7 +270,7 @@ $(DRIVER_TARG): $(DRIVER_DEPS) | $(DRIVER_TARG_DIR) $(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)