Re-structure Volker's patch to "Fix trans2findfirst for the large directory optimizat...
[Samba.git] / examples / libsmbclient / Makefile
blobe6afdeb51920c786a87739200f9fbdf1d4acb980
2 CC = gcc
4 SAMBA_INCL = -I/usr/local/samba/include
5 EXTLIB_INCL = -I/usr/include/gtk-1.2 \
6 -I/usr/include/glib-1.2 \
7 -I/usr/lib/glib/include
8 #EXTLIB_INCL = `gtk-config --cflags`
10 DEFS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
11 CFLAGS = -O0 -g $(SAMBA_INCL) $(EXTLIB_INCL) $(DEFS)
13 LDFLAGS = -L/usr/local/samba/lib \
14 -lldap -lkrb5 -lgssapi_krb5
15 #LIBSMBCLIENT = /usr/local/samba/lib/libsmbclient.so
16 LIBSMBCLIENT = -lwbclient -lsmbclient -ldl -lresolv
18 TESTS= testsmbc \
19 testacl \
20 testacl2 \
21 testacl3 \
22 testbrowse \
23 testbrowse2 \
24 teststat \
25 teststat2 \
26 teststat3 \
27 testtruncate \
28 testchmod \
29 testutime \
30 testread \
31 testwrite
33 # tree \
35 all: $(TESTS) smbsh
37 testsmbc: testsmbc.o
38 @echo Linking testsmbc
39 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBSMBCLIENT)
41 tree: tree.o
42 @echo Linking tree
43 $(CC) `gtk-config --cflags` $(CFLAGS) $(LDFLAGS) -o $@ $< `gtk-config --libs` $(LIBSMBCLIENT)
45 testacl: testacl.o
46 @echo Linking testacl
47 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBSMBCLIENT) -lpopt
49 testacl2: testacl2.o
50 @echo Linking testacl2
51 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBSMBCLIENT) -lpopt
53 testacl3: testacl3.o
54 @echo Linking testacl3
55 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBSMBCLIENT) -lpopt
57 testbrowse: testbrowse.o
58 @echo Linking testbrowse
59 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBSMBCLIENT) -lpopt
61 testbrowse2: testbrowse2.o
62 @echo Linking testbrowse2
63 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBSMBCLIENT) -lpopt
65 teststat: teststat.o
66 @echo Linking teststat
67 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBSMBCLIENT) -lpopt
69 teststat2: teststat2.o
70 @echo Linking teststat2
71 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBSMBCLIENT) -lpopt
73 teststat3: teststat3.o
74 @echo Linking teststat3
75 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBSMBCLIENT) -lpopt
77 testtruncate: testtruncate.o
78 @echo Linking testtruncate
79 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBSMBCLIENT) -lpopt
81 testchmod: testchmod.o
82 @echo Linking testchmod
83 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBSMBCLIENT) -lpopt
85 testutime: testutime.o
86 @echo Linking testutime
87 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBSMBCLIENT) -lpopt
89 testread: testread.o
90 @echo Linking testread
91 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBSMBCLIENT) -lpopt
93 testwrite: testwrite.o
94 @echo Linking testwrite
95 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBSMBCLIENT) -lpopt
97 testctx: testctx.o
98 @echo Linking testctx
99 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBSMBCLIENT) -lpopt
101 smbsh:
102 make -C smbwrapper
104 clean:
105 @rm -f *.o *~ $(TESTS)
106 @make -C smbwrapper clean