Makefile revision 1878
961N/A#
961N/A# CDDL HEADER START
961N/A#
961N/A# The contents of this file are subject to the terms of the
961N/A# Common Development and Distribution License, Version 1.0 only
961N/A# (the "License"). You may not use this file except in compliance
961N/A# with the License.
961N/A#
961N/A# You can obtain a copy of the license at
961N/A# trunk/opends/resource/legal-notices/OpenDS.LICENSE
961N/A# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
961N/A# See the License for the specific language governing permissions
961N/A# and limitations under the License.
961N/A#
961N/A# When distributing Covered Code, include this CDDL HEADER in each
961N/A# file and include the License file at
961N/A# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
961N/A# add the following below this CDDL HEADER, with the fields enclosed
961N/A# by brackets "[]" replaced with your own identifying information:
961N/A# Portions Copyright [yyyy] [name of copyright owner]
961N/A#
961N/A# CDDL HEADER END
961N/A#
961N/A#
961N/A# Portions Copyright 2007 Sun Microsystems, Inc.
961N/A
961N/A#
961N/A# This is the Makefile than can be used to generate the executables
961N/A# winlauncher.exe and opends_service.exe that are used by OpenDS in
961N/A# windows.
961N/A#
961N/A# The compilation of winlauncher.exe is straightforward but in the case of
961N/A# opends_service.exe uses a Message File called EventLogMsg.mc which
961N/A# makes the compilation a little bit more complex.
961N/A# During compilation the first step is to generate EventLogMsg.h and
961N/A# EventLogMsg.res using the rc.exe and mc.exe utilities.
961N/A#
961N/A# EventLogMsg.h contains some references to the message IDs that are sent to
961N/A# the Windows Event Log and is required in order service.c to be compiled.
961N/A# Once the EvenLogMsg.h file is generated we can compile the service.c and
961N/A# common.c and finally we link the service.obj, common.obj and
961N/A# EventLogMsg.res files and we generate the opends_service.exe executable.
961N/A#
961N/A
961N/ACC=cl
961N/ASERVICE_PROGNAME=opends_service.exe
1878N/ALAUNCHER_ADMINISTRATOR_PROGNAME=launcher_administrator.exe
961N/AWINLAUNCHER_PROGNAME=winlauncher.exe
1878N/ALINKER=link -nologo /machine:x86
961N/ALIBS=advapi32.lib
961N/A
1878N/ACFLAGS= -D_WINDOWS -nologo -W3 -O2
961N/ARC=rc
961N/AMC=mc
1878N/AMT=mt
961N/A
961N/ASRCS = common.c winlauncher.c service.c
961N/A
961N/ASERVICE_OBJS = common.obj service.obj
961N/AWINLAUNCHER_OBJS = common.obj winlauncher.obj
961N/A
961N/AEVENTLOG_H = EventLogMsg.h
961N/A
961N/AMC_FILE = EventLogMsg.mc
961N/A
961N/ARC_FILE = EventLogMsg.rc
961N/A
961N/ARES_FILE = EventLogMsg.res
961N/A
1878N/ASERVICE_MANIFEST_FILE = opends_service.exe.manifest
1878N/ALAUNCHER_ADMINISTRATOR_MANIFEST_FILE = launcher_administrator.exe.manifest
1878N/A
961N/A.c.obj:
961N/A $(CC) $(CFLAGS) -c $< -Fo$@
961N/A
961N/A$(RES_FILE):
961N/A $(MC) $(MC_FILE)
961N/A $(RC) /fo $(RES_FILE) $(RC_FILE)
961N/A
961N/A
1878N/Aall: $(SERVICE_PROGNAME) $(WINLAUNCHER_PROGNAME) $(LAUNCHER_ADMINISTRATOR_PROGNAME)
961N/A
961N/A$(SERVICE_PROGNAME) : $(RES_FILE) $(SERVICE_OBJS)
961N/A $(LINKER) /OUT:$(SERVICE_PROGNAME) $(RES_FILE) $(SERVICE_OBJS) $(LIBS)
1878N/A $(MT) -manifest "$(SERVICE_MANIFEST_FILE)" -outputresource:"$(SERVICE_PROGNAME)";#1
1878N/A
961N/A$(WINLAUNCHER_PROGNAME) : $(WINLAUNCHER_OBJS)
961N/A $(LINKER) $(WINLAUNCHER_OBJS) /OUT:$(WINLAUNCHER_PROGNAME)
961N/A
1878N/A$(LAUNCHER_ADMINISTRATOR_PROGNAME) : $(WINLAUNCHER_OBJS)
1878N/A $(LINKER) $(WINLAUNCHER_OBJS) /OUT:$(LAUNCHER_ADMINISTRATOR_PROGNAME)
1878N/A $(MT) -manifest "$(LAUNCHER_ADMINISTRATOR_MANIFEST_FILE)" -outputresource:"$(LAUNCHER_ADMINISTRATOR_PROGNAME)";#1
1878N/A
961N/Aclean:
1878N/A del $(SERVICE_OBJS) $(EVENTLOG_H) $(WINLAUNCHER_OBJS) $(RC_FILE) $(RES_FILE) $(SERVICE_PROGNAME) $(WINLAUNCHER_PROGNAME) $(LAUNCHER_ADMINISTRATOR_PROGNAME) core
961N/A