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