Continued revamping of libsmbclient.
[Samba/gbeck.git] / examples / libsmbclient / Makefile
bloba50e80a9189e87d1f454ba8f639fa89715900e85
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 smbsh:
98 make -C smbwrapper
100 clean:
101 @rm -f *.o *~ $(TESTS)
102 @make -C smbwrapper clean