Created
April 30, 2012 15:49
-
-
Save dai1741/2559476 to your computer and use it in GitHub Desktop.
flexとgccを使ってフォルダ内の*.lexを*.exeにコンパイルするMakefile
This file contains 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
LEX = flex | |
CC = gcc | |
LDLIBS=-lfl | |
LEXES = $(wildcard *.lex) | |
EXES = $(LEXES:%.lex=%.exe) | |
all: $(EXES) | |
%.c:%.lex | |
$(LEX) -o $@ $^ | |
%.exe:%.c | |
$(CC) -o $@ $^ $(LDLIBS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment