-
Notifications
You must be signed in to change notification settings - Fork 13
/
GNUmakefile
59 lines (42 loc) · 1.37 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
#----------------------------------------------------------------------------------------------
# Makefile for VapourSynth plugins
#----------------------------------------------------------------------------------------------
include config.mak
vpath %.cpp $(SRCDIR)
vpath %.h $(SRCDIR)
OBJ_SOURCE = $(SRC_SOURCE:%.cpp=%.o)
SRC_ALL = $(SRC_SOURCE)
ifneq ($(STRIP),)
LDFLAGS += -Wl,-s
endif
.PHONY: all clean distclean dep
all: $(SONAME)
$(SONAME): $(OBJ_SOURCE)
$(LD) $(SOFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
-@ $(if $(STRIP), $(STRIP) -x $@)
%.o: %.cpp .depend
$(CXX) $(CXXFLAGS) -c $< -o $@
install: all
install -d $(DESTDIR)$(libdir) $(DESTDIR)$(vsplugindir)
ifneq ($(IMPLIB),)
install -m 644 $(IMPLIB) $(DESTDIR)$(libdir)
else
install -m 644 $(SONAME) $(DESTDIR)$(libdir)/$(SONAME)
$(if $(SONAME), ln -f -s $(libdir)/$(SONAME) $(DESTDIR)$(vsplugindir)/$(SONAME_LN))
endif
#All objects should be deleted regardless of configure when uninstall/clean/distclean.
uninstall:
$(RM) $(addprefix $(DESTDIR), $(libdir)/$(SONAME) $(vsplugindir)/$(SONAME_LN))
clean:
$(RM) $(SONAME) *.o .depend
distclean: clean
$(RM) config.*
dep: .depend
ifneq ($(wildcard .depend),)
include .depend
endif
.depend: config.mak
@$(RM) .depend
@$(foreach SRC, $(SRC_ALL:%=$(SRCDIR)/%), $(CXX) $(SRC) $(CXXFLAGS) -msse2 -g0 -MT $(SRC:$(SRCDIR)/%.cpp=%.o) -MM >> .depend;)
config.mak:
configure