8e7070cb597b8010699535927216509b2442b4ad
[samba.git] / examples / libsmbclient / smbwrapper / Makefile
1 LIBS = -lsmbclient -ldl
2 DEFS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
3
4 CFLAGS = -I$(SAMBA_INCL) $(EXTLIB_INCL)
5
6 LDFLAGS = -L/usr/local/samba/lib
7
8 SMBINCLUDE = -I../../../source/include
9 CFLAGS= -fpic -g -O0 $(DEFS) $(SMBINCLUDE)
10
11 BIN     = .
12
13 SMBWRAPPER_OBJS = smbw.o smbw_dir.o smbw_stat.o wrapper.o select.o 
14 SMBSH_OBJS      = smbsh.o
15
16 all:    $(BIN)/smbwrapper.so $(BIN)/smbsh
17
18 $(BIN)/smbwrapper.so:   $(SMBWRAPPER_OBJS)
19         $(CC) -g \
20                 -Wl,-init=smbw_initialize \
21                 -shared \
22                 --export-all-symbols \
23                 -o $(BIN)/smbwrapper.so \
24                 $(SMBWRAPPER_OBJS) \
25                 $(LDFLAGS) \
26                 $(LIBS) \
27                 -Wl,-soname=`basename $@`
28
29 $(BIN)/smbsh: $(SMBSH_OBJS)
30         $(CC) -g -o $(BIN)/smbsh $(SMBSH_OBJS) $(LIBS) $(LDFLAGS)
31
32 opendir_smbsh:  opendir_smbsh.o
33         $(CC) -g -o opendir_smbsh opendir_smbsh.o $(LIBS) $(DMALLOC)
34
35 clean:
36         rm -f *.o *~ opendir_smbsh smbsh smbwrapper.so