2001-05-17 02:29:00 +00:00
#
2001-06-30 11:08:06 +00:00
CC = gcc
2001-05-17 02:29:00 +00:00
2008-03-03 18:13:33 -05:00
SAMBA_INCL = -I/usr/local/samba/include
2003-10-24 20:24:05 +00:00
EXTLIB_INCL = -I/usr/include/gtk-1.2 \
-I/usr/include/glib-1.2 \
-I/usr/lib/glib/include
2008-01-10 11:13:23 +01:00
EXTLIB_INCL = ` gtk-config --cflags`
2006-09-03 00:50:34 +00:00
2012-03-28 10:40:02 +11:00
DEFS = -D_FILE_OFFSET_BITS= 64 -D_GNU_SOURCE
2008-03-03 18:13:33 -05:00
CFLAGS = -O0 -g $( SAMBA_INCL) $( EXTLIB_INCL) $( DEFS)
2001-05-17 02:29:00 +00:00
2007-08-14 03:02:34 +00:00
LDFLAGS = -L/usr/local/samba/lib \
-lldap -lkrb5 -lgssapi_krb5
2007-04-08 16:41:24 +00:00
#LIBSMBCLIENT = /usr/local/samba/lib/libsmbclient.so
2008-05-30 10:24:55 -04:00
LIBSMBCLIENT = -lwbclient -lsmbclient -ltalloc -ltdb -ldl -lresolv
2001-05-17 02:29:00 +00:00
2005-03-31 16:26:15 +00:00
TESTS = testsmbc \
testacl \
2007-05-15 19:10:29 +00:00
testacl2 \
2008-01-17 11:46:41 -05:00
testacl3 \
2005-03-31 16:26:15 +00:00
testbrowse \
2005-12-06 17:09:44 +00:00
testbrowse2 \
2005-03-31 16:26:15 +00:00
teststat \
2005-12-25 02:00:35 +00:00
teststat2 \
2008-01-17 09:26:36 -05:00
teststat3 \
2009-02-12 10:39:17 -05:00
teststatvfs \
testfstatvfs \
2008-02-26 21:46:08 -05:00
testtruncate \
2005-03-31 16:26:15 +00:00
testchmod \
2005-10-17 19:27:19 +00:00
testutime \
2008-01-17 09:26:36 -05:00
testread \
testwrite
2005-03-31 16:26:15 +00:00
2007-08-14 03:02:34 +00:00
# tree \
2005-03-31 16:26:15 +00:00
all : $( TESTS ) smbsh
2001-05-17 02:29:00 +00:00
testsmbc : testsmbc .o
@echo Linking testsmbc
2006-09-03 00:50:34 +00:00
$( CC) $( CFLAGS) $( LDFLAGS) -o $@ $< $( LIBSMBCLIENT)
2001-06-30 04:01:51 +00:00
2001-05-17 02:29:00 +00:00
tree : tree .o
@echo Linking tree
2007-04-08 16:41:24 +00:00
$( CC) ` gtk-config --cflags` $( CFLAGS) $( LDFLAGS) -o $@ $< ` gtk-config --libs` $( LIBSMBCLIENT)
2001-05-17 02:29:00 +00:00
2003-10-24 20:24:05 +00:00
testacl : testacl .o
@echo Linking testacl
2007-08-14 03:02:34 +00:00
$( CC) $( CFLAGS) $( LDFLAGS) -o $@ $< $( LIBSMBCLIENT) -lpopt
2003-10-24 20:24:05 +00:00
2007-05-15 19:10:29 +00:00
testacl2 : testacl 2.o
@echo Linking testacl2
2007-08-14 03:02:34 +00:00
$( CC) $( CFLAGS) $( LDFLAGS) -o $@ $< $( LIBSMBCLIENT) -lpopt
2007-05-15 19:10:29 +00:00
2008-01-17 11:46:41 -05:00
testacl3 : testacl 3.o
@echo Linking testacl3
$( CC) $( CFLAGS) $( LDFLAGS) -o $@ $< $( LIBSMBCLIENT) -lpopt
2004-03-19 17:48:08 +00:00
testbrowse : testbrowse .o
@echo Linking testbrowse
2007-04-08 16:41:24 +00:00
$( CC) $( CFLAGS) $( LDFLAGS) -o $@ $< $( LIBSMBCLIENT) -lpopt
2004-03-19 17:48:08 +00:00
2005-12-06 17:09:44 +00:00
testbrowse2 : testbrowse 2.o
@echo Linking testbrowse2
2007-04-08 16:41:24 +00:00
$( CC) $( CFLAGS) $( LDFLAGS) -o $@ $< $( LIBSMBCLIENT) -lpopt
2005-12-06 17:09:44 +00:00
2005-03-30 02:39:22 +00:00
teststat : teststat .o
@echo Linking teststat
2007-04-08 16:41:24 +00:00
$( CC) $( CFLAGS) $( LDFLAGS) -o $@ $< $( LIBSMBCLIENT) -lpopt
2005-03-30 02:39:22 +00:00
2005-12-25 02:00:35 +00:00
teststat2 : teststat 2.o
@echo Linking teststat2
2007-04-08 16:41:24 +00:00
$( CC) $( CFLAGS) $( LDFLAGS) -o $@ $< $( LIBSMBCLIENT) -lpopt
2005-12-25 02:00:35 +00:00
2008-01-17 09:26:36 -05:00
teststat3 : teststat 3.o
@echo Linking teststat3
$( CC) $( CFLAGS) $( LDFLAGS) -o $@ $< $( LIBSMBCLIENT) -lpopt
2009-02-12 10:39:17 -05:00
teststatvfs : teststatvfs .o
@echo Linking teststatvfs
$( CC) $( CFLAGS) $( LDFLAGS) -o $@ $< $( LIBSMBCLIENT) -lpopt
testfstatvfs : testfstatvfs .o
@echo Linking testfstatvfs
$( CC) $( CFLAGS) $( LDFLAGS) -o $@ $< $( LIBSMBCLIENT) -lpopt
2008-02-26 21:46:08 -05:00
testtruncate : testtruncate .o
@echo Linking testtruncate
$( CC) $( CFLAGS) $( LDFLAGS) -o $@ $< $( LIBSMBCLIENT) -lpopt
2005-03-31 16:26:15 +00:00
testchmod : testchmod .o
@echo Linking testchmod
2007-04-08 16:41:24 +00:00
$( CC) $( CFLAGS) $( LDFLAGS) -o $@ $< $( LIBSMBCLIENT) -lpopt
2005-03-31 16:26:15 +00:00
testutime : testutime .o
@echo Linking testutime
2007-04-08 16:41:24 +00:00
$( CC) $( CFLAGS) $( LDFLAGS) -o $@ $< $( LIBSMBCLIENT) -lpopt
2005-03-31 16:26:15 +00:00
2005-10-17 19:27:19 +00:00
testread : testread .o
@echo Linking testread
2007-04-08 16:41:24 +00:00
$( CC) $( CFLAGS) $( LDFLAGS) -o $@ $< $( LIBSMBCLIENT) -lpopt
2005-10-17 19:27:19 +00:00
2008-01-17 09:26:36 -05:00
testwrite : testwrite .o
@echo Linking testwrite
$( CC) $( CFLAGS) $( LDFLAGS) -o $@ $< $( LIBSMBCLIENT) -lpopt
2008-08-12 13:35:15 -07:00
testctx : testctx .o
@echo Linking testctx
$( CC) $( CFLAGS) $( LDFLAGS) -o $@ $< $( LIBSMBCLIENT) -lpopt
2005-03-29 00:42:51 +00:00
smbsh :
make -C smbwrapper
2001-05-17 02:29:00 +00:00
clean :
2005-03-31 16:26:15 +00:00
@rm -f *.o *~ $( TESTS)
2005-03-29 00:42:51 +00:00
@make -C smbwrapper clean