-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
39 lines (32 loc) · 969 Bytes
/
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
#
# makefile
#
# Makefile to build `jprime`, for use with GNU Make on Unix-like systems.
#
# Run `make` to build the executable, `make clean` to clean the intermediate
# object files in the `build` directory.
#
# Copyright (C) 1998-2024 Jack Boyce, <[email protected]>
#
# This file is distributed under the MIT License.
#
CC = g++
CFLAGS = -Wall -Wextra -std=c++20 -O3
SDIR = src
ODIR = build
OBJ = jprime.o jprime_tests.o Graph.o State.o Worker.o GenLoopsRecursive.o \
GenLoopsIterative.o Coordinator.o WorkAssignment.o SearchConfig.o \
SearchContext.o Pattern.o
DEP = Graph.h State.h Worker.h Coordinator.h WorkAssignment.h SearchConfig.h \
SearchContext.h Pattern.h
_OBJ = $(patsubst %,$(ODIR)/%,$(OBJ))
_DEP = $(patsubst %,$(SDIR)/%,$(DEP))
jprime: $(_OBJ)
$(CC) -o jprime $(_OBJ) $(CFLAGS)
$(ODIR)/%.o: $(SDIR)/%.cc $(_DEP) | builddir
$(CC) -c -o $@ $< $(CFLAGS)
.PHONY: builddir clean
builddir:
mkdir -p $(ODIR)
clean:
rm -rf $(ODIR)