1 LIBS
= -lwbclient
-lsmbclient
-ltalloc
-ltdb
-ldl
2 DEFS
= -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS
=64 -D_GNU_SOURCE
4 CFLAGS
= -I
$(SAMBA_INCL
) $(EXTLIB_INCL
)
6 LDFLAGS
= -L
/usr
/local
/samba
/lib
-L..
/..
/..
/source3
/bin
8 SMBINCLUDE
= -I..
/..
/..
/source3
/include
9 CFLAGS
= -fpic
-g
-O0
$(DEFS
) $(SMBINCLUDE
)
13 STRFUNC
= bsd-strlcat.o bsd-strlcpy.o
16 SMBWRAPPER_OBJS
= smbw.o smbw_dir.o smbw_stat.o wrapper.o select.o
$(STRFUNC
)
17 SMBSH_OBJS
= smbsh.o
$(STRFUNC
)
19 all: $(BIN
)/smbwrapper.so
$(BIN
)/smbsh
21 $(BIN
)/smbwrapper.so
: $(SMBWRAPPER_OBJS
)
23 -Wl
,-init
=smbw_initialize \
25 --export-all-symbols \
26 -o
$(BIN
)/smbwrapper.so \
30 -Wl
,-soname
=`basename $@`
32 $(BIN
)/smbsh
: $(SMBSH_OBJS
)
33 $(CC
) -g
-o
$(BIN
)/smbsh
$(SMBSH_OBJS
) $(LIBS
) $(LDFLAGS
)
35 opendir_smbsh
: opendir_smbsh.o
36 $(CC
) -g
-o opendir_smbsh opendir_smbsh.o
$(LIBS
) $(DMALLOC
)
39 rm -f
*.o
*~ opendir_smbsh smbsh smbwrapper.so