Makefile revision 3231
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# CDDL HEADER START
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# The contents of this file are subject to the terms of the
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrock# Common Development and Distribution License, Version 1.0 only
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrock# (the "License"). You may not use this file except in compliance
fa9e4066f08beec538e775443c5be79dd423fcabahrens# with the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# You can obtain a copy of the license at
fa9e4066f08beec538e775443c5be79dd423fcabahrens# trunk/opends/resource/legal-notices/OpenDS.LICENSE
fa9e4066f08beec538e775443c5be79dd423fcabahrens# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# See the License for the specific language governing permissions
fa9e4066f08beec538e775443c5be79dd423fcabahrens# and limitations under the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# When distributing Covered Code, include this CDDL HEADER in each
fa9e4066f08beec538e775443c5be79dd423fcabahrens# file and include the License file at
fa9e4066f08beec538e775443c5be79dd423fcabahrens# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
fa9e4066f08beec538e775443c5be79dd423fcabahrens# add the following below this CDDL HEADER, with the fields enclosed
fa9e4066f08beec538e775443c5be79dd423fcabahrens# by brackets "[]" replaced with your own identifying information:
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Portions Copyright [yyyy] [name of copyright owner]
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrock# CDDL HEADER END
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Copyright 2008 Sun Microsystems, Inc.
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# This is the Makefile than can be used to generate the executables
fa9e4066f08beec538e775443c5be79dd423fcabahrens# winlauncher.exe and opends_service.exe that are used by OpenDS in
fa9e4066f08beec538e775443c5be79dd423fcabahrens# windows.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# The compilation of winlauncher.exe is straightforward but in the case of
fa9e4066f08beec538e775443c5be79dd423fcabahrens# opends_service.exe uses a Message File called EventLogMsg.mc which
fa9e4066f08beec538e775443c5be79dd423fcabahrens# makes the compilation a little bit more complex.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# During compilation the first step is to generate EventLogMsg.h and
fa9e4066f08beec538e775443c5be79dd423fcabahrens# EventLogMsg.res using the rc.exe and mc.exe utilities.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# EventLogMsg.h contains some references to the message IDs that are sent to
fa9e4066f08beec538e775443c5be79dd423fcabahrens# the Windows Event Log and is required in order service.c to be compiled.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Once the EvenLogMsg.h file is generated we can compile the service.c and
fa9e4066f08beec538e775443c5be79dd423fcabahrens# common.c and finally we link the service.obj, common.obj and
fa9e4066f08beec538e775443c5be79dd423fcabahrens# EventLogMsg.res files and we generate the opends_service.exe executable.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensCC=cl
fa9e4066f08beec538e775443c5be79dd423fcabahrensSERVICE_PROGNAME=opends_service.exe
fa9e4066f08beec538e775443c5be79dd423fcabahrensLAUNCHER_ADMINISTRATOR_PROGNAME=launcher_administrator.exe
fa9e4066f08beec538e775443c5be79dd423fcabahrensWINLAUNCHER_PROGNAME=winlauncher.exe
fa9e4066f08beec538e775443c5be79dd423fcabahrensLINKER=link -nologo /machine:x86
fa9e4066f08beec538e775443c5be79dd423fcabahrensLIBS=advapi32.lib
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensCFLAGS= -D_WINDOWS -nologo -W3 -O2
fa9e4066f08beec538e775443c5be79dd423fcabahrensRC=rc
fa9e4066f08beec538e775443c5be79dd423fcabahrensMC=mc
fa9e4066f08beec538e775443c5be79dd423fcabahrensMT=mt
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensSRCS = common.c winlauncher.c service.c
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensSERVICE_OBJS = common.obj service.obj
fa9e4066f08beec538e775443c5be79dd423fcabahrensWINLAUNCHER_OBJS = common.obj winlauncher.obj
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensEVENTLOG_H = EventLogMsg.h
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensMC_FILE = EventLogMsg.mc
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrock
fa9e4066f08beec538e775443c5be79dd423fcabahrensRC_FILE = EventLogMsg.rc
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensRES_FILE = EventLogMsg.res
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensSERVICE_MANIFEST_FILE = opends_service.exe.manifest
fa9e4066f08beec538e775443c5be79dd423fcabahrensLAUNCHER_ADMINISTRATOR_MANIFEST_FILE = launcher_administrator.exe.manifest
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens.c.obj:
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(CC) $(CFLAGS) -c $< -Fo$@
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens$(RES_FILE):
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(MC) $(MC_FILE)
99653d4ee642c6528e88224f12409a5f23060994eschrock $(RC) /fo $(RES_FILE) $(RC_FILE)
99653d4ee642c6528e88224f12409a5f23060994eschrock
99653d4ee642c6528e88224f12409a5f23060994eschrock
fa9e4066f08beec538e775443c5be79dd423fcabahrensall: $(SERVICE_PROGNAME) $(WINLAUNCHER_PROGNAME) $(LAUNCHER_ADMINISTRATOR_PROGNAME)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens$(SERVICE_PROGNAME) : $(RES_FILE) $(SERVICE_OBJS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(LINKER) /OUT:$(SERVICE_PROGNAME) $(RES_FILE) $(SERVICE_OBJS) $(LIBS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(MT) -manifest "$(SERVICE_MANIFEST_FILE)" -outputresource:"$(SERVICE_PROGNAME)";#1
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens$(WINLAUNCHER_PROGNAME) : $(WINLAUNCHER_OBJS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(LINKER) $(WINLAUNCHER_OBJS) /OUT:$(WINLAUNCHER_PROGNAME)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens$(LAUNCHER_ADMINISTRATOR_PROGNAME) : $(WINLAUNCHER_OBJS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(LINKER) $(WINLAUNCHER_OBJS) /OUT:$(LAUNCHER_ADMINISTRATOR_PROGNAME)
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(MT) -manifest "$(LAUNCHER_ADMINISTRATOR_MANIFEST_FILE)" -outputresource:"$(LAUNCHER_ADMINISTRATOR_PROGNAME)";#1
99653d4ee642c6528e88224f12409a5f23060994eschrock
99653d4ee642c6528e88224f12409a5f23060994eschrockclean:
99653d4ee642c6528e88224f12409a5f23060994eschrock del $(SERVICE_OBJS) $(EVENTLOG_H) $(WINLAUNCHER_OBJS) $(RC_FILE) $(RES_FILE) $(SERVICE_PROGNAME) $(WINLAUNCHER_PROGNAME) $(LAUNCHER_ADMINISTRATOR_PROGNAME) core
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens