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