forked from mekanix/libmaolan
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakeinclude.Linux
More file actions
31 lines (24 loc) · 808 Bytes
/
makeinclude.Linux
File metadata and controls
31 lines (24 loc) · 808 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
SRCS = $(wildcard src/*.cpp)
OBJECTS = $(SRCS:.cpp=.o)
LIBNAME = lib$(LIB_CXX).so
LIBNAME_VERSIONED = $(LIBNAME).$(SHLIB_MAJOR)
.DEFAULT_GOAL := all
all: $(LIBNAME)
$(LIBNAME): $(LIBNAME_VERSIONED)
ln -s $(LIBNAME_VERSIONED) $(LIBNAME)
$(LIBNAME_VERSIONED): $(OBJECTS)
@echo -n "Linking $(LIB_CXX) ... "
@$(CXX) $(CXXFLAGS) $(OBJECTS) -shared -o $(LIBNAME_VERSIONED) $(LDFLAGS)
@echo "done"
.cpp.o:
@echo -n "$< ... "
@$(CXX) $(CFLAGS) $(CXXFLAGS) -c $< -o $@
@echo "done"
install:
install -m 0755 $(LIBNAME) $(DESTDIR)$(PREFIX)/lib
install -m 0755 $(LIBNAME_VERSIONED) $(DESTDIR)$(PREFIX)/lib
cp -r maolan $(DESTDIR)$(PREFIX)/include
clean:
rm -rf $(OBJECTS) $(LIBNAME) $(LIBNAME_VERSIONED)
distclean: clean
rm -rf config.log config.status configure makeinclude.configured autom4te.cache