-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
47 lines (32 loc) · 1.03 KB
/
Makefile
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
42
43
44
45
46
CC=gcc
#CFLAGS=-ggdb3 -Wall
CFLAGS=-Wall -O3
#fsanitize=-fsanitize=undefined
#CC=clang-3.5 $(fsanitize) `llvm-config --ldflags`
#CFLAGS=-fno-omit-frame-pointer -g -Wall -pedantic -mtune=native
CXX=g++
CXXFLAGS= -std=c++11 -O3 -Wall -I/usr/local/include
PROGRAMS=only_ascii mean_strlen orderfreq construct_search timeread test_ffr multiple_8 construct_search_cpp
OBJS=only_ascii.o mean_strlen.o orderfreq.o fast_file_reader.o multiple_8.o construct_search_cpp.o
all: $(PROGRAMS)
%.o: %.c
$(CC) -c -o $@ $< $(CFLAGS)
%.o: %.cpp
$(CXX) -c -o $@ $< $(CXXFLAGS)
only_ascii: only_ascii.o
$(CC) -o $@ $^ $(CFLAGS)
orderfreq: orderfreq.o fast_file_reader.o
$(CC) -o $@ $^ $(CFLAGS)
test_ffr: test_ffr.o fast_file_reader.o
$(CC) -o $@ $^ $(CFLAGS)
timeread: timeread.o
$(CC) -o $@ $^ $(CFLAGS)
construct_search: construct_search.o
$(CC) -o $@ $^ $(CFLAGS)
construct_search_cpp: construct_search_cpp.o
$(CXX) -o $@ $^ $(CXXFLAGS)
multiple_8: multiple_8.o
$(CC) -o $@ $^ $(CFLAGS)
.PHONY: clean
clean:
rm -f *.o *~ core $(PROGRAMS) $(OBJS)