-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (20 loc) · 500 Bytes
/
Makefile
File metadata and controls
29 lines (20 loc) · 500 Bytes
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
# pull in shared compiler settings
include ../common.mk
# per-example flags
# CXXFLAGS += -pthread
TARGET := $(notdir $(CURDIR))
SRCS := $(wildcard *.cpp)
OBJS := $(SRCS:.cpp=.o)
all: $(TARGET)
$(TARGET): $(OBJS)
$(CXX) $(CXXFLAGS) -o $@ $^
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
run: $(TARGET)
./$(TARGET) $(ARGS)
clean:
rm -f $(OBJS) $(TARGET)
# Delegates to top-level Makefile
check-format:
$(MAKE) -f ../Makefile check-format DIR=$(CURDIR)
.PHONY: all clean run check-format