view regexParser/Makefile @ 167:3bf2c6d6d53e pairPro

move regexparser dir
author masa
date Sat, 19 Dec 2015 15:38:45 +0900
parents c/regexParser/Makefile@42f4ee38196e
children 02031fb73af8
line wrap: on
line source

TARGET= regexParser
MERGE= mergeTest
CFLAGS= -Wall -O0 -g
CC= clang++

SRCS_TMP = $(wildcard *.cc)
SRCS_EXCLUDE =  determinize.cc mergeTest.cc
SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP))
OBJS = $(SRCS:.cc=.o)

SRCS_TMP1_MERGE = $(wildcard *.cc)
SRCS_EXCLUDE1_MERGE =  determinize.cc main.cc
SRCS1_MERGE = $(filter-out $(SRCS_EXCLUDE1_MERGE),$(SRCS_TMP1_MERGE))
OBJS_MERGE = $(SRCS1_MERGE:.cc=.o)

.cc.o:
	$(CC) $(CFLAGS) -c $< -o $@

all: $(TARGET) $(MERGE)

$(TARGET):$(OBJS)
	$(CC) -o $@ $(OBJS)

$(MERGE):$(OBJS_MERGE)
	$(CC) -o $@ $(OBJS_MERGE)

clean:
	rm -f $(TARGET) $(MERGE) $(OBJS) $(OBJS_MERGE)
	rm -f *~ \#*

.SUFFIXES: .cc .o

test:
	./$(TARGET) -regex 'a'
	./$(TARGET) -regex 'ab'
	./$(TARGET) -regex 'ab*'
	./$(TARGET) -regex '(ab)*'
	./$(TARGET) -regex '(ab)*c'
	./$(TARGET) -regex '(ab)c'
	./$(TARGET) -regex '(a|b)c'
	./$(TARGET) -regex 'a(bc)*d'
	./$(TARGET) -regex 'abc*d'
	./$(TARGET) -regex '(ab)c*d'
	./$(TARGET) -regex 'a(b)c'
	./$(TARGET) -regex '(a|b|c)d'
	./$(TARGET) -regex '(a|b|c)*d'
	./$(TARGET) -regex '[a]'
	./$(TARGET) -regex '[ab]'
	./$(TARGET) -regex '[a-z]'
	./$(TARGET) -regex '[a-zA-Z]'
	./$(TARGET) -regex '[a-zA-Z]*'
	./$(TARGET) -regex 'a[a-zA-Z]*'
	./$(TARGET) -regex 'a([a-z])'
	./$(TARGET) -regex 'a|[a-z]'
	./$(TARGET) -regex 'a|[a-z]*'
	./$(TARGET) -regex 'a*|[a-z]'
	./$(TARGET) -regex '[d-ga-c]'
	./$(TARGET) -regex '[d-ga-d]'
	./$(TARGET) -regex '[d-ga-e]'
	./$(TARGET) -regex '[d-ga-f]'
	./$(TARGET) -regex '[d-ga-h]'
	./$(TARGET) -regex '[d-gd-e]'
	./$(TARGET) -regex '[d-gd-f]'
	./$(TARGET) -regex '[d-gd-h]'
	./$(TARGET) -regex '[d-ge-f]'
	./$(TARGET) -regex '[d-ge-g]'
	./$(TARGET) -regex '[d-ge-i]'
	./$(TARGET) -regex '[d-gg-i]'
	./$(TARGET) -regex '[d-gh-i]'
	./$(TARGET) -regex '[d-ga-cx-z]'
	./$(TARGET) -regex '[d-ga-de-d]'
	./$(TARGET) -regex '[d-ga-db-e]'
	./$(TARGET) -regex '[d-gh-ja-e]'

merge_test:
	./$(MERGE) -regex '[f-i]' -merge '[d-e]'
	./$(MERGE) -regex '[f-i]' -merge '[d-f]'
	./$(MERGE) -regex '[f-i]' -merge '[d-g]'
	./$(MERGE) -regex '[f-i]' -merge '[d-i]'
	./$(MERGE) -regex '[f-i]' -merge '[d-k]'
	./$(MERGE) -regex '[f-i]' -merge '[f-g]'
	./$(MERGE) -regex '[f-i]' -merge '[f-i]'
	./$(MERGE) -regex '[f-i]' -merge '[f-k]'
	./$(MERGE) -regex '[f-i]' -merge '[g-h]'
	./$(MERGE) -regex '[f-i]' -merge '[g-i]'
	./$(MERGE) -regex '[f-i]' -merge '[g-k]'
	./$(MERGE) -regex '[f-i]' -merge '[i-k]'
	./$(MERGE) -regex '[f-i]' -merge '[j-k]'
	./$(MERGE) -regex '[c-ef-i]' -merge '[d-e]'
	./$(MERGE) -regex '[c-ef-i]' -merge '[d-f]'
	./$(MERGE) -regex '[c-ef-i]' -merge '[d-g]'
	./$(MERGE) -regex '[c-ef-i]' -merge '[d-i]'
	./$(MERGE) -regex '[c-ef-ij-m]' -merge '[d-k]'
	./$(MERGE) -regex '[f-ij-m]' -merge '[f-k]'
	./$(MERGE) -regex '[f-ij-m]' -merge '[g-k]'
	./$(MERGE) -regex '[f-ij-m]' -merge '[i-k]'
	./$(MERGE) -regex '[f-ij-m]' -merge '[j-k]'