summaryrefslogtreecommitdiff
path: root/Makefile
blob: 11b00bdeea8b00e778de932a88165ce48bd62b1d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
PROJECT=dm
CC=gcc
CFLAGS=-std=c1x 
SOURCES=$(PROJECT)_parser.c darray.c tokenizer.c syntax.c mtable.c
OBJECTS=$(SOURCES:.c=.o)

all: clean ragel $(OBJECTS) $(PROJECT)

$(PROJECT):
	$(CC) $(CFLAGS) $(OBJECTS) $(PROJECT).c -o $(PROJECT)

ragel:
	ragel $(PROJECT)_parser.ragel

%.o: %.c
	$(CC) $(CFLAGS) -c $<

clean:
	rm -f $(PROJECT)
	rm -f *.o