include updates
[tomato.git] / release / src-rt-6.x.4708 / router / samba-3.0.25b / Makefile
blobfe7b5472c04b035ce011cf7046e5360650e8ec8d
1 include ../common.mak
3 #srcdir=source
4 srcdir=source
6 SMBCFLAGS = $(EXTRACFLAGS) -Os -ffunction-sections -fdata-sections
7 SMBLDFLAGS = -ffunction-sections -fdata-sections -Wl,--gc-sections
9 ifeq ($(RTCONFIG_BCMARM), y)
10 SMBLDFLAGS += -lgcc_s
11 endif
13 ifneq ($(CONFIG_LINUX26),y)
14 SMBCFLAGS += -DMAX_DEBUG_LEVEL="-1"
15 endif
17 ifeq ($(RTCONFIG_BCMARM), y)
18 HOST = arm
19 else
20 HOST = mips
21 endif
23 all: .conf apps
25 apps: .conf
26 mkdir -p $(srcdir)/bin
27 $(MAKE) -C $(srcdir) all
29 .conf:
30 cd $(srcdir) && \
31 export SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=yes ; \
32 export libreplace_cv_READDIR_GETDIRENTRIES=no ; \
33 export libreplace_cv_READDIR_GETDENTS=no ; \
34 export linux_getgrouplist_ok=no ; \
35 export samba_cv_REPLACE_READDIR=no ; \
36 export samba_cv_HAVE_WRFILE_KEYTAB=yes ; \
37 export samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes ; \
38 export samba_cv_HAVE_KERNEL_CHANGE_NOTIF=yes ; \
39 export samba_cv_HAVE_KERNEL_SHARE_MODES=yes ; \
40 export samba_cv_HAVE_IFACE_IFCONF=yes ; \
41 export samba_cv_USE_SETRESUID=yes ; \
42 $(CONFIGURE) \
43 --prefix=/usr \
44 --bindir=/usr/bin \
45 --sbindir=/usr/sbin \
46 --libdir=/etc \
47 --localstatedir=/var \
48 --host=$(HOST)-linux \
49 --with-configdir=/etc \
50 --with-rootsbindir=/usr/sbin \
51 --with-piddir=/var/run/samba \
52 --with-privatedir=/etc/samba \
53 --with-lockdir=/var/lock \
54 --with-included-popt=no \
55 --with-krb5=no \
56 --with-shared-modules=MODULES \
57 --enable-shared \
58 --disable-static \
59 --disable-cups \
60 --disable-iprint \
61 --disable-pie \
62 --disable-fam \
63 --disable-dmalloc \
64 --disable-krb5developer \
65 --disable-developer \
66 --disable-debug \
67 --without-ads \
68 --without-acl-support \
69 --without-ldap \
70 --without-cifsmount \
71 --without-cifsupcall \
72 --without-cluster-support \
73 --without-utmp \
74 --without-winbind \
75 --without-quotas \
76 --without-sys-quotas
77 touch .conf
78 mkdir -p $(srcdir)/bin
80 clean:
81 -$(MAKE) -C $(srcdir) distclean
82 @rm -f .conf
84 distclean: clean
85 @find $(srcdir) -name config.h | xargs rm -f
86 @find $(srcdir) -name Makefile | xargs rm -f
87 @find $(srcdir) -name config.status | xargs rm -f
88 @find $(srcdir) -name config.cache | xargs rm -f
90 install: all
91 @install -d $(INSTALLDIR)/usr/bin/
92 @install -d $(INSTALLDIR)/usr/sbin/
93 @install -d $(INSTALLDIR)/usr/lib/
94 @install -D $(srcdir)/bin/smbd $(INSTALLDIR)/usr/sbin/smbd
95 @install -D $(srcdir)/bin/nmbd $(INSTALLDIR)/usr/sbin/nmbd
96 @install -D $(srcdir)/bin/smbpasswd $(INSTALLDIR)/usr/bin/smbpasswd
97 # @install -D $(srcdir)/bin/libsmbclient.so $(INSTALLDIR)/usr/lib/libsmbclient.so
98 @install -D $(srcdir)/bin/libbigballofmud.so.0 $(INSTALLDIR)/usr/lib/libbigballofmud.so.0
99 ifeq ($(RTCONFIG_BCMARM),y)
100 @cp prebuilt.arm/lib/libresolv.so.0 $(INSTALLDIR)/usr/lib/libresolv.so.0
101 else
102 @cp prebuilt/lib/libresolv.so.0 $(INSTALLDIR)/usr/lib/libresolv.so.0
103 endif
104 ###############################Charles Modify##########
106 $(STRIP) -s $(INSTALLDIR)/usr/sbin/smbd
107 $(STRIP) -s $(INSTALLDIR)/usr/sbin/nmbd
108 $(STRIP) -s $(INSTALLDIR)/usr/bin/smbpasswd
109 # $(STRIP) -s $(INSTALLDIR)/usr/lib/libsmbclient.so
110 # do not strip shared library, it will be optimized by libfoo.pl
111 # $(STRIP) -s $(INSTALLDIR)/usr/lib/libbigballofmud.so