-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmakefile
More file actions
42 lines (29 loc) · 751 Bytes
/
makefile
File metadata and controls
42 lines (29 loc) · 751 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
30
31
32
33
34
35
36
37
38
39
40
41
42
#~/user/bin/make -f
EXECUTABLE = showsheets
SO_LIBRARY = showsheets.so
CC = gcc
CXX = g++
CFLAGS = -fPIC -Wno-enum-conversion -O3
CXXFLAGS = -fPIC -std=c++11 -O3 -Wfatal-errors -Werror
LDFLAGS = -pthread
SRC_SHOWSHEETS = \
src/showsheets.cpp \
src/pole.cpp
# Object files
OBJS = \
$(SRC_SHOWSHEETS:.cpp=.o)
# Rules
all: $(EXECUTABLE) $(SO_LIBRARY)
$(EXECUTABLE): $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CPP_FILES) -o $@ $^
$(SO_LIBRARY): $(OBJS)
$(CXX) $(LDFLAGS) -shared -o $@ $^
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -rf `find Source -name '*.o'` $(EXECUTABLE) $(SO_LIBRARY)
BINDIR ?= ${PREFIX}/bin
install:
@cp -p bin/showsheets ${PREFIX}/showsheets