-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmakefile
More file actions
56 lines (44 loc) · 1.32 KB
/
makefile
File metadata and controls
56 lines (44 loc) · 1.32 KB
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
47
48
49
50
51
52
53
54
55
56
CXX = g++
CXXFLAGS = -std=c++20 -Wall -MMD -MP -mavx2
SRC_DIR = src
OBJ_DIR = obj
TARGET = pixelbasher
SRCS = $(wildcard $(SRC_DIR)/*.cpp)
OBJS = $(patsubst $(SRC_DIR)/%.cpp, $(OBJ_DIR)/%.o, $(SRCS))
# Default target
all: release
debug: CXXFLAGS += -g
debug: $(TARGET)
release: CXXFLAGS += -O3 -DNDEBUG
release: $(TARGET)
$(TARGET) : $(OBJS)
$(CXX) $(CXXFLAGS) $(OBJS) -o $(TARGET)
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp
mkdir -p $(OBJ_DIR)
$(CXX) $(CXXFLAGS) -c $< -o $@
-include $(OBJS:.o=.d)
.PHONY: check clean
check: $(TARGET)
rm -f converted/import/doc/* converted/export/doc/*
mkdir -p ./converted/import/doc ./converted/export/doc
./$(TARGET) fdo69695-1.doc \
converted/input/authoritative-page-0.bmp \
converted/input/import-page-0.bmp \
converted/input/export-page-0.bmp \
converted/import/doc \
converted/export/doc \
converted/import-compare/doc \
converted/export-compare/doc \
converted/image-dump/doc \
stamps \
false false false false false
cmp ./converted/import/doc/fdo69695-1.doc_import-1.bmp ./converted/expected/fdo69695-1.doc_import-1.bmp
cmp ./converted/export/doc/fdo69695-1.doc_export-1.bmp ./converted/expected/fdo69695-1.doc_export-1.bmp
clean:
rm -fr $(OBJ_DIR) \
$(TARGET) \
./*.csv \
converted/export \
converted/export-compare \
converted/import \
converted/import-compare