-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.in
60 lines (47 loc) · 1.35 KB
/
Makefile.in
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
CC = @CC@
CFLAGS = @CFLAGS@ $(GLFS_CFLAGS)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@ $(GLFS_LDADD)
LDSHFLAGS = @LDSHFLAGS@
INSTALLCMD = @INSTALL@
SAMBA_SOURCE = @SAMBA_SOURCE@
SHLIBEXT = @SHLIBEXT@
OBJEXT = @OBJEXT@
FLAGS = $(CFLAGS) $(CPPFLAGS) -fPIC \
-Iinclude -I$(SAMBA_SOURCE)/include \
-I$(SAMBA_SOURCE)/../popt \
-I$(SAMBA_SOURCE)/../lib/replace \
-I$(SAMBA_SOURCE)/../lib/talloc \
-I$(SAMBA_SOURCE)/../lib/tevent \
-I$(SAMBA_SOURCE)/../lib/tdb/include \
-I$(SAMBA_SOURCE)/librpc \
-I$(SAMBA_SOURCE)/../librpc \
-I$(SAMBA_SOURCE)/../ \
-I$(SAMBA_SOURCE) -I.
exec_prefix = @prefix@
libdir = @libdir@
VFS_LIBDIR = $(libdir)/vfs
SRC_DIR = src
SRC_FILES = $(SRC_DIR)/%.c
OUT_DIR = .libs
OUT_FILES = $(OUT_DIR)/%.$(SHLIBEXT)
# Auto target
default: $(patsubst $(SRC_FILES),$(OUT_FILES),$(wildcard src/*.c))
# Pattern rules
$(OUT_FILES): %.$(OBJEXT)
@echo "Linking $@"
mkdir -p $(OUT_DIR)
@$(CC) $(LDSHFLAGS) $(LDFLAGS) -o $@ $<
%.$(OBJEXT): $(SRC_FILES)
@echo "Compiling $<"
@$(CC) $(FLAGS) -c $< -D$*_init=init_samba_module
install: default
rename vfs_ "" $(OUT_DIR)/*
$(INSTALLCMD) -d $(VFS_LIBDIR)
$(INSTALLCMD) -m 755 $(OUT_DIR)/* $(VFS_LIBDIR)
# Misc targets
clean:
rm -rf .libs
rm -f core *~ *% *.bak *.o
distclean: clean
rm -f config.log config.status config.cache configure module_config.h module_config.h.in Makefile