blob: dd4518f212d4e5d014a432acd12349e47a05f632 (
plain)
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
# Makefile.internal.in for building the libsmbclient examples
# from within a samba build.
#
# Use Makfile for building the examples with a libsmbclient
# installed to /usr/local/samba
CC = @CC@
SAMBA_DIR = ../../source
SAMBA_INCLUDES = -I$(SAMBA_DIR)/include
SAMBA_LIBPATH = -L$(SAMBA_DIR)/bin
GTK_CFLAGS = `gtk-config --cflags`
GTK_LIBS = `gtk-config --libs`
#GTK_CFLAGS = `pkg-config gtk+-2.0 --cflags`
#GTK_LIBS = `pkg-config gtk+-2.0 --libs`
FLAGS = @CPPFLAGS@ @CFLAGS@ $(GTK_CFLAGS) $(SAMBA_INCLUDES)
PICFLAG=@PICFLAG@
LDFLAGS= $(SAMBA_LIBPATH) @PIE_LDFLAGS@ @LDFLAGS@
EXTERNAL_LIBS = @LIBS@ @LDAP_LIBS@ @KRB5_LIBS@ @NSCD_LIBS@
LIBSMBCLIENT_LIBS = -lwbclient -lsmbclient -ltalloc -ltdb -ldl -lresolv
CMDLINE_LIBS = @POPTLIBS@
LIBS = $(EXTERNAL_LIBS) $(LIBSMBCLIENT_LIBS)
# Compile a source file. (.c --> .o)
COMPILE_CC = $(CC) -I. $(FLAGS) $(PICFLAG) -c $< -o $@
COMPILE = $(COMPILE_CC)
MAKEDIR = || exec false; \
if test -d "$$dir"; then :; else \
echo mkdir "$$dir"; \
mkdir -p "$$dir" >/dev/null 2>&1 || \
test -d "$$dir" || \
mkdir "$$dir" || \
exec false; fi || exec false
TESTS= testsmbc \
testacl \
testacl2 \
testacl3 \
testbrowse \
testbrowse2 \
teststat \
teststat2 \
teststat3 \
testtruncate \
testchmod \
testutime \
testread \
testwrite
# tree \
all: $(TESTS) smbsh
.c.o:
@if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
@echo Compiling $*.c
@$(COMPILE) && exit 0;\
echo "The following command failed:" 1>&2;\
echo "$(COMPILE_CC)" 1>&2;\
$(COMPILE_CC) >/dev/null 2>&1
testsmbc: testsmbc.o
@echo Linking testsmbc
@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
tree: tree.o
@echo Linking tree
@$(CC) $(GTK_CFLAGS) $(FLAGS) $(LDFLAGS) -o $@ $< $(GTK_LIBS) $(LIBS)
testacl: testacl.o
@echo Linking testacl
@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
testacl2: testacl2.o
@echo Linking testacl2
@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
testacl3: testacl3.o
@echo Linking testacl3
@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
testbrowse: testbrowse.o
@echo Linking testbrowse
@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
testbrowse2: testbrowse2.o
@echo Linking testbrowse2
@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
teststat: teststat.o
@echo Linking teststat
@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
teststat2: teststat2.o
@echo Linking teststat2
@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
teststat3: teststat3.o
@echo Linking teststat3
@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
testtruncate: testtruncate.o
@echo Linking testtruncate
@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
testchmod: testchmod.o
@echo Linking testchmod
@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
testutime: testutime.o
@echo Linking testutime
@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
testread: testread.o
@echo Linking testread
@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
testwrite: testwrite.o
@echo Linking testwrite
@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
testctx: testctx.o
@echo Linking testctx
@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
smbsh:
make -C smbwrapper
clean:
@rm -f *.o *~ $(TESTS)
@make -C smbwrapper clean
|