-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (22 loc) · 961 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
# Compiler settings
CXX = /usr/bin/g++
CXXFLAGS = -Wall -Wextra -pedantic -std=c++20 -Iinclude -I/usr/local/epics/base/7-0-3/include -I/usr/local/epics/base/7-0-3/include/os/Linux -I/usr/local/epics/base/7-0-3/include/compiler/gcc/ -L/u
# Directories
SRC_DIR = src
INC_DIRS = include /usr/local/epics/base/7-0-3/include /usr/local/epics/base/7-0-3/include/os/Linux /usr/local/epics/base/7-0-3/include/compiler/gcc/
LIB_DIRS = /usr/local/epics/base/7-0-3/lib/linux-x86_64 lib
# Libraries
LIBS = Com ca
# Targets
TARGET = testEpicsProxy
SRCS = $(wildcard $(SRC_DIR)/*.cpp)
OBJS = $(patsubst $(SRC_DIR)/%.cpp,$(SRC_DIR)/%.o,$(filter-out testEpicsProxy.cpp,$(SRCS)))
# Build rules
all: $(TARGET)
$(TARGET): $(OBJS) testEpicsProxy.cpp
$(CXX) $(CXXFLAGS) -o $@ $^ $(addprefix -L,$(LIB_DIRS)) $(addprefix -l,$(LIBS))
$(SRC_DIR)/%.o: $(SRC_DIR)/%.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $< $(addprefix -I,$(INC_DIRS))
clean:
rm -f $(OBJS) $(TARGET)
.PHONY: all clean