Created
March 2, 2019 13:13
-
-
Save tralamazza/c146be11592c3d8900e867f984525776 to your computer and use it in GitHub Desktop.
simple way to compile ragel examples (one source per executable)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RAGELFILES:= $(wildcard *.rl) | |
EXECUTABLES:= $(patsubst %.rl, %, $(RAGELFILES)) | |
LDFLAGS+= -lstdc++ | |
%.cc : %.rl | |
ragel -G2 -C -o $@ $< | |
all: $(EXECUTABLES) | |
clean: | |
rm -vf $(EXECUTABLES) | |
# Uncomment this to preserve the generated .cc files | |
# .SECONDARY: $(patsubst %.rl, %.cc, $(RAGELFILES)) | |
.PHONY: all clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Assumes C++