#* ***** BEGIN LICENSE BLOCK ***** # Version: CDDL 1.0 # # The contents of this file are subject to the COMMON DEVELOPMENT AND # DISTRIBUTION LICENSE (CDDL) Version 1.0 (the "License"); you may not use # this file except in compliance with the License. You may obtain a copy of # the License at http://www.sun.com/cddl/ # # Software distributed under the License is distributed on an "AS IS" basis, # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License # for the specific language governing rights and limitations under the # License. # # The Original Code is # "netlabs.org Open Source Archive Administrator/Client" # # The Original Distribution Package is named # "netlabs.org Open Source Archive Administrator/Client" # and maintained and distributed by the Initial Developer # and/or netlabs.org only. # # In addition to the CDDL the following applies: # If you modify the Original Code, you may distribute it only # as a part of a distribution package where # - the name of the package, created directories or # OS2.INI entries do not contain any of the terms # - "netlabs.org Open Source Archive" # - "NOSA" # - "NOSAC" # - "NOSAADM" # - neither netlabs.org nor the Initial Developer is stated as # the vendor or originator of the resulting Distribution Package, # which contains the Modified Code. # # The Initial Developer of the Original Code is # netlabs.org: Christian Langanke . # Portions created by the Initial Developer are Copyright (C) 1999-2008 # the Initial Developer. All Rights Reserved. # # Contributor(s): # # ***** END LICENSE BLOCK ***** */ # include configuration (compiler options), # also defines $(BINDIR), $(INCDIR) etc. BASEDIR=.. PRJINC=$(BASEDIR)\config\project.in !include $(BASEDIR)\config\rules.in DESCRIPTION=NOSA WPI makefile !ifndef CALLED !if [@echo $(STARTMSG)] !endif !endif # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .SUFFIXES: .SUFFIXES: .wpi .wis .txt .os2 .diz .inf .zip # --- source definitions WISFILE=nosa.wis # --- define files to build or being required # NOTE: WPIFILE LOGFILE OPTFILE are defined in project.in COPYFLAGFILE=$(CMPDIR)\copyfiles.___ # define files that WPI depends on # including file sof other makefiles (MK_*) WPI_DEPENDENDIES=$(WISFILE) \ $(COPYFLAGFILE) \ $(DIZFILES) \ $(BASEDIR)\config\* \ $(BASEDIR)\$(ADMIN_FILESTEM)\ship\* \ $(CMPDIR)\$(ADMIN_FILESTEM)*.inf \ $(CMPDIR)\$(ADMIN_FILESTEM)*.hlp \ $(BASEDIR)\$(CLIENT_FILESTEM)\ship\* \ $(BASEDIR)\$(CLIENT_FILESTEM)\ico\* \ $(CMPDIR)\$(CLIENT_FILESTEM)*.inf \ $(CMPDIR)\$(CLIENT_FILESTEM)*.hlp \ $(BASEDIR)\shared\ico\* \ $(BASEDIR)\shared\bmp\nltiled*.bmp \ $(BASEDIR)\shared\bin\* \ $(BINDIR)\*.exe \ # --- define packages PACKAGES= $(PCKCLIENT) $(PCKADMIN) $(PCKINIT) # package 1: admin package PCKADMIN= 1 -r -c$(ADMINDIR) * # package 2: client package PCKCLIENT= 2 -r -c$(CLIENTDIR) * # package 9: external config files (hidden) PCKINIT= 9 -r -c$(INITDIR) * # define what to build TARGET= $(WPIFILE) # files to be created temporarily DIZFILES=$(MK_CONFIG_NOSA_DIZ) # define what to cleanup CLEANUPFILES= $(WPIFILE) $(LOGFILE) $(OPTFILE) \ $(COPYFLAGFILE) $(DIZFILES) CLEANUPDIRS= $(ADMINDIR) $(CLIENTDIR) $(INITDIR) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # pseudotargets all:$(WPIFILE) @echo $(ENDMSG) run: $(TARGET) runwpi $(TARGET) @echo $(ENDMSG) run_nobuild: runwpi $(TARGET) @echo $(ENDMSG) clean: @echo cleaning up files ... -@for %%a in ($(CLEANUPFILES)) do @del %%a /N $(TO_NUL) @for %%a in ($(CLEANUPDIRS)) do @kd %%a @echo $(ENDMSG) !include $(BASEDIR)\config\common.in # ---------------------------------------------------------------------- # - - - copy files to be packed $(COPYFLAGFILE): $(DIZFILES) # @ECHO preparing admin files... # # --- cleanup directories # @FOR %%a IN (bin bmp ico inf install samples) DO \ @CALL kd $(ADMINDIR)\%%a > NUL 2>&1 & MD $(ADMINDIR)\%%a $(TO_NUL) # # --- copy files # @XCOPY $(BASEDIR)\$(ADMIN_FILESTEM)\ship\* $(ADMINDIR)\ /S $(TO_NUL) @COPY $(BASEDIR)\shared\ico\* $(ADMINDIR)\ico\ $(TO_NUL) @COPY $(BASEDIR)\shared\bmp\nltiled*.bmp $(ADMINDIR)\bmp\ $(TO_NUL) @COPY $(BASEDIR)\shared\bin\* $(ADMINDIR)\bin\ $(TO_NUL) @COPY $(CMPDIR)\$(ADMIN_FILESTEM)*.inf $(ADMINDIR)\inf\ $(TO_NUL) @COPY $(CMPDIR)\$(ADMIN_FILESTEM)*.hlp $(ADMINDIR)\inf\ $(TO_NUL) @COPY $(BINDIR)\*.exe $(ADMINDIR)\bin\ $(TO_NUL) @COPY $(MK_CONFIG_NOSA_DIZ) $(ADMINDIR)\ $(TO_NUL) @touchrel $(ADMINDIR) # # ----------------------------------------------------------------------------- # @ECHO preparing client files... # # --- cleanup directories # @FOR %%a IN (bin bmp ico inf install samples) DO \ @CALL kd $(CLIENTDIR)\%%a > NUL 2>&1 & MD $(CLIENTDIR)\%%a $(TO_NUL) # # --- copy files # @XCOPY $(BASEDIR)\$(CLIENT_FILESTEM)\ship\* $(CLIENTDIR)\ /S $(TO_NUL) @COPY $(BASEDIR)\$(CLIENT_FILESTEM)\ico\* $(CLIENTDIR)\ico\ $(TO_NUL) @COPY $(BASEDIR)\shared\ico\* $(CLIENTDIR)\ico\ $(TO_NUL) @COPY $(BASEDIR)\shared\bmp\nltiled*.bmp $(CLIENTDIR)\bmp\ $(TO_NUL) @COPY $(BASEDIR)\shared\bin\* $(CLIENTDIR)\bin\ $(TO_NUL) @COPY $(CMPDIR)\$(CLIENT_FILESTEM)*.inf $(CLIENTDIR)\inf\ $(TO_NUL) @COPY $(CMPDIR)\$(CLIENT_FILESTEM)*.hlp $(CLIENTDIR)\inf\ $(TO_NUL) @COPY $(MK_CONFIG_NOSA_DIZ) $(CLIENTDIR)\ $(TO_NUL) @touchrel $(CLIENTDIR) # # ----------------------------------------------------------------------------- # @ECHO preparing script files... # # --- copy files @COPY $(MK_CONFIG_NOSA_SOURCE) $(INITDIR)\ $(TO_NUL) @touchrel $(INITDIR) # # --- we are done so far @TYPE NUL> $(COPYFLAGFILE) # ---------------------------------------------------------------------- # - - - build WPI $(WPIFILE): $(WPI_DEPENDENDIES) @ECHO building WPI file... -@DEL $(WPIFILE) $(TO_NUL) @ECHO @<<$(OPTFILE) -s $(WISFILE) -a $(PACKAGES) < $(LOGFILE) 2>&1