File: PRIM_RULES.msvc

package info (click to toggle)
hercules 3.13-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,392 kB
  • sloc: ansic: 175,124; sh: 8,792; makefile: 760; perl: 149
file content (81 lines) | stat: -rw-r--r-- 3,164 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# ***************************************************************************
#     PRIM_RULES.msvc      (!INCLUDE ed by "makefile-dllmod.msvc")
# --------------------------------------------------------------------------
# (c) Copyright Roger Bowler, 2005-2007
# --------------------------------------------------------------------------
# $Id$
#
#  Primary generic build rules...  ('all', 'clean', etc...)
#
#
#                           CHANGE HISTORY
# $Log$
# Revision 1.2  2008/10/11 23:47:05  fish
# Fix MSVC build failure when 'rebase' utility doesn't exist
# Add CVS "Id" and "Log"
#
#
# DD/MM/YY Description
#
# 26/12/06 Fish: created by extraction from existing makefile-dllmod.msvc
# 07/02/10 Fish: allHercules, rmdir DYNDIR, del fna
#
# ***************************************************************************

# ---------------------------------------------------------------------
#  Primary build rules...
# ---------------------------------------------------------------------

all: allzlib alllibbz2 allpcre allHercules
    for %I in (rebase.exe) do if exist %~$$PATH:I rebase -b 0x400000 $(X)*.dll
    if exist $(EXEDIR)\*.manifest del /f /q $(EXEDIR)\*.manifest

allHercules: $(OBJDIR) $(EXEDIR) $(PDBDIR) $(MAPDIR) $(ASMDIR) \
    $(O)build_pch.pch \
    $(MODULES) \
    $(EXECUTABLES)

clean: $(OBJDIR) $(EXEDIR) $(PDBDIR) $(MAPDIR) $(ASMDIR)
    if exist $(OBJDIR)\*.* rmdir /s /q $(OBJDIR)
    if exist $(EXEDIR)\*.* rmdir /s /q $(EXEDIR)
    if exist $(PDBDIR)\*.* rmdir /s /q $(PDBDIR)
    if exist $(MAPDIR)\*.* rmdir /s /q $(MAPDIR)
!IFDEF ASSEMBLY_LISTINGS
    if exist $(ASMDIR)\*.* rmdir /s /q $(ASMDIR)
!ENDIF
!IFDEF DYNDIR
    if exist $(DYNDIR)\*.* rmdir /s /q $(DYNDIR)
!ENDIF
!IFDEF fna
    if exist $(fna) del /f /q $(fna)
!ENDIF

MT_EXE_CMD=if exist $@.manifest mt.exe -nologo -outputresource:$@;1 -manifest $@.manifest
MT_DLL_CMD=if exist $@.manifest mt.exe -nologo -outputresource:$@;2 -manifest $@.manifest

linkexe = $(link) -nologo $(ldebug) $(conlflags) $(O)build_pch.obj $** $(LIBS) -out:$@ -implib:$(O)$(@B).lib $(conlibsdll) $(MAPFILE) && $(MT_EXE_CMD)
linkdll = $(link) -nologo $(ldebug) $(dlllflags) $(O)build_pch.obj $** $(LIBS) -out:$@ -implib:$(O)$(@B).lib $(conlibsdll) $(MAPFILE) && $(MT_DLL_CMD)

{$(OBJDIR)}.obj{$(EXEDIR)}.exe:
    $(linkexe)

{$(OBJDIR)}.obj{$(EXEDIR)}.dll:
    $(linkdll)

# Dummy target entry: Since the primary target is .DLL
# and .LIB is generated in the same step.. And .LIB
# are used as input, the following generates an effective
# rule, with no side effect

{$(EXEDIR)}.dll{$(OBJDIR)}.lib:
    echo $* $@

.c{$(OBJDIR)}.obj::
    $(cc) $(cdebug) $(cflags) /Fp"$(OBJDIR)\\build_pch.pch" /Yu"hstdinc.h" $(cvarsdll) /Fo"$(OBJDIR)\\" /Fd"$(OBJDIR)\\" $<

# NOTE: to be safe, since this member contains build rules, we need to
# make sure there's always a blank line following the last build rule
# in the member so that nmake doesn't complain or otherwise treat the
# statements immediately following the original !INCLUDE statement as
# part of the build rule actions. Thus the purpose of the comments you
# are now reading as the very last few lines in every build rule member.