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