forked from Khanattila/KNLMeansCL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile
47 lines (32 loc) · 947 Bytes
/
GNUmakefile
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
43
44
45
46
47
#----------------------------------------------------------------------------
# Makefile for KNLmeansCL
# Author: sl1pkn07
#----------------------------------------------------------------------------
include config.mak
vpath %.cpp $(SRCDIR)
vpath %.h $(SRCDIR)
SRCS = KNLMeansCL/KNLMeansCL.cpp
OBJS = $(SRCS:%.cpp=%.o)
.PHONY: all install clean distclean dep
all: $(LIBNAME)
$(LIBNAME): $(OBJS)
$(LD) -o $@ $(LDFLAGS) $^ $(LIBS)
-@ $(if $(STRIP), $(STRIP) -x $@)
%.o: %.cpp .depend
$(CXX) $(CXXFLAGS) -c $< -o $@
install: all
install -d $(DESTDIR)$(libdir)
install -m 755 $(LIBNAME) $(DESTDIR)$(libdir)
clean:
$(RM) *.dll *.so *.dylib $(OBJS) .depend
distclean: clean
$(RM) config.*
dep: .depend
ifneq ($(wildcard .depend),)
include .depend
endif
.depend: config.mak
@$(RM) .depend
@$(foreach SRC, $(SRCS:%=$(SRCDIR)/%), $(CXX) $(SRC) $(CXXFLAGS) -MT $(SRC:$(SRCDIR)/%.cpp=%.o) -MM >> .depend;)
config.mak:
./configure