# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2001 Sun Microsystems, Inc.  Used by permission.
# Copyright (C) 2005 Red Hat, Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
#

# END COPYRIGHT BLOCK
# Admin server makefile.
# Mike McCool

BUILD_ROOT = ..

NOSTDCLEAN=true
NOSTDSTRIP=true

include $(BUILD_ROOT)/nsconfig.mk

ifeq ($(ARCH), AIX)
MFLAGS :=
endif

ALLTARGETS = do-src do-cgi-src do-html
ifndef NOJAVA
ALLTARGETS += do-console
endif

ALLTARGETS += do-cfg

ifeq ($(ARCH), WINNT)
ALLTARGETS += do-viewurl
endif

ALLTARGETS += do-inst do-ldap-stuffs do-icons

all: $(ALLTARGETS)

do-src:
#	cd src; $(MAKE) BUILD_MODULE=HTTP_ADMIN $(MFLAGS)
	mkdir -p $(OBJDIR)/admin-lib

do-cgi-src:
	cd cgi-src40; $(MAKE) BUILD_MODULE=HTTP_ADMIN $(MFLAGS)

do-html:
	cd html; $(MAKE) BUILD_MODULE=HTTP_ADMIN $(MFLAGS)

#do-console: jfc ldapjdk
do-console: 
	cd console; $(MAKE) BUILD_MODULE=HTTP_ADMIN $(MFLAGS)

do-icons:
	cd icons40; $(MAKE) BUILD_MODULE=HTTP_ADMIN $(MFLAGS)

do-cfg:
	cd cfgstuff; $(MAKE) BUILD_MODULE=HTTP_ADMIN $(MFLAGS)

do-inst:
	cd newinst/src ; $(MAKE) BUILD_MODULE=HTTP_ADMIN $(MFLAGS)

do-viewurl:
	cd viewurl/nt; $(MAKE) BUILD_MODULE=HTTP_ADMIN $(MFLAGS)

#
# remove end user access for admin server 4.5
#
#do-user-forms:
#	cd user-forms ; $(MAKE) BUILD_MODULE=HTTP_ADMIN $(MFLAGS)

do-ldap-stuffs:
	cd schema ; $(MAKE) BUILD_MODULE=HTTP_ADMIN $(MFLAGS)

clean:
	cd src; $(MAKE) BUILD_MODULE=HTTP_ADMIN clean $(MFLAGS)
	cd cgi-src40; $(MAKE) BUILD_MODULE=HTTP_ADMIN clean $(MFLAGS)
	cd html; $(MAKE) BUILD_MODULE=HTTP_ADMIN clean $(MFLAGS)
	cd icons; $(MAKE) BUILD_MODULE=HTTP_ADMIN clean $(MFLAGS)
	cd cfgstuff; $(MAKE) BUILD_MODULE=HTTP_ADMIN clean $(MFLAGS)
	cd do-viewurl/nt; $(MAKE) BUILD_MODULE=HTTP_ADMIN clean $(MFLAGS)
#	cd user-forms; $(MAKE) BUILD_MODULE=HTTP_ADMIN clean $(MFLAGS)
