-
Notifications
You must be signed in to change notification settings - Fork 88
/
Make
41 lines (34 loc) · 1.27 KB
/
Make
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Makefile to quickly build the projects and install reflex:
# > make -f Make
# Normally you should use configure and make to build and install:
# > ./configure && make
# > sudo make install
CPP=c++
REFLEX=../bin/reflex
LIBS=../lib/libreflex.a
COFLAGS=-g -O2
CWFLAGS=-Wall -Wunused -Wextra
CIFLAGS=-I. -I../include
CMFLAGS=
CFLAGS=$(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
.PHONY: all clean
all: block_scripts.cpp language_scripts.cpp letter_scripts.cpp
block_scripts.cpp: Blocks.txt block_scripts.l
$(REFLEX) block_scripts.l
$(CPP) $(CFLAGS) -o gen_block_scripts_cpp lex.yy.cpp $(LIBS)
./gen_block_scripts_cpp < Blocks.txt > block_scripts.cpp
-rm -f lex.yy.cpp gen_block_scripts_cpp
language_scripts.cpp: Scripts.txt language_scripts.l
$(REFLEX) language_scripts.l
$(CPP) $(CFLAGS) -o gen_language_scripts_cpp lex.yy.cpp $(LIBS)
./gen_language_scripts_cpp < Scripts.txt > language_scripts.cpp
-rm -f lex.yy.cpp gen_language_scripts_cpp
letter_scripts.cpp: UnicodeData.txt letter_scripts.l
$(REFLEX) letter_scripts.l
$(CPP) $(CFLAGS) -o gen_letter_scripts_cpp lex.yy.cpp $(LIBS)
./gen_letter_scripts_cpp < UnicodeData.txt > letter_scripts.cpp
-rm -f lex.yy.cpp gen_letter_scripts_cpp
clean:
-rm -rf *.dSYM
-rm -f *.o *.gch *.log
-rm -f reflex