-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.nmake
128 lines (107 loc) · 4.85 KB
/
Makefile.nmake
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# $Id: Makefile,v 1.82 2011/10/31 08:48:56 bzfkocht Exp $
#* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
#* *
#* File....: Makefile *
#* Name....: Zimpl Makefile *
#* Author..: Thorsten Koch *
#* Copyright by Author, All rights reserved *
#* *
#* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
#*
#* Copyright (C) 2005-2024 by Thorsten Koch <[email protected]>
#*
#* This program is free software; you can redistribute it and/or
#* modify it under the terms of the GNU General Public License
#* as published by the Free Software Foundation; either version 2
#* of the License, or (at your option) any later version.
#*
#* This program is distributed in the hope that it will be useful,
#* but WITHOUT ANY WARRANTY; without even the implied warranty of
#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#* GNU General Public License for more details.
#*
#* You should have received a copy of the GNU General Public License
#* along with this program; if not, write to the Free Software
#* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#*
#
#.PHONY: all clean
ARCH = x86
OSTYPE = win
VERSION = 3.7.0
VERBOSE = 0
LINK = normal
OPT = opt
COMP = msvc
CC = cl
AR = lib
LD = link
SRCDIR = src
BINDIR = bin
LIBDIR = lib
CPPFLAGS = /DVERSION=\"$(VERSION)\" \
/I$(SRCDIR) /I$(SRCDIR)\WIN \
/Dpopen=_popen /Dpclose=_pclose /DWITH_PCRE=1 \
/Ilib\zlib \
/Ilib\pcre \
/Ilib\mpir.$(ARCH) \
/D_CRT_SECURE_NO_WARNINGS
CFLAGS =
ARFLAGS = /nologo
LIBS = lib\libz.$(ARCH).lib \
lib\libpcre.$(ARCH).lib \
lib\libmpir.$(ARCH).lib
LDFLAGS = /NODEFAULTLIB:LIBCMT /NODEFAULTLIB:LIBCMTD /STACK:67108864 /OPT:REF /OPT:ICF /NOLOGO
BASE = $(OSTYPE).$(ARCH).$(COMP).$(OPT)
OBJDIR = obj\O.$(OSTYPE).$(ARCH).$(COMP).$(LINK).$(OPT)
NAME = zimpl
BINNAME = $(NAME)-$(VERSION).$(OSTYPE).$(ARCH).$(COMP).$(LINK).$(OPT)
LIBNAME = $(NAME)-$(VERSION).$(BASE)
LIBRARY = $(LIBDIR)\lib$(LIBNAME).lib
BINARY = $(BINDIR)\$(BINNAME).exe
DEPEND = $(SRCDIR)\depend
#-----------------------------------------------------------------------------
OBJECT = $(OBJDIR)\zimpl.obj $(OBJDIR)\xlpglue.obj $(OBJDIR)\zlpglue.obj \
$(OBJDIR)\ratlpstore.obj $(OBJDIR)\ratlpfwrite.obj $(OBJDIR)\ratmpswrite.obj $(OBJDIR)\ratmstwrite.obj \
$(OBJDIR)\ratordwrite.obj $(OBJDIR)\ratpresolve.obj
LIBBASE = $(OBJDIR)\getopt.obj $(OBJDIR)\blkmem.obj $(OBJDIR)\bound.obj $(OBJDIR)\code.obj $(OBJDIR)\conname.obj \
$(OBJDIR)\define.obj $(OBJDIR)\elem.obj $(OBJDIR)\entry.obj \
$(OBJDIR)\hash.obj $(OBJDIR)\heap.obj $(OBJDIR)\idxset.obj $(OBJDIR)\inst.obj $(OBJDIR)\iread.obj $(OBJDIR)\list.obj \
$(OBJDIR)\load.obj $(OBJDIR)\local.obj $(OBJDIR)\metaio.obj $(OBJDIR)\mmlparse2.obj $(OBJDIR)\mmlscan.obj $(OBJDIR)\mono.obj \
$(OBJDIR)\mshell.obj $(OBJDIR)\prog.obj $(OBJDIR)\random.obj $(OBJDIR)\rdefpar.obj $(OBJDIR)\source.obj \
$(OBJDIR)\setempty.obj $(OBJDIR)\setpseudo.obj $(OBJDIR)\setlist.obj $(OBJDIR)\setrange.obj $(OBJDIR)\setprod.obj \
$(OBJDIR)\setmulti.obj $(OBJDIR)\set4.obj $(OBJDIR)\stmt.obj $(OBJDIR)\stkchk.obj $(OBJDIR)\strstore2.obj $(OBJDIR)/symbol.obj \
$(OBJDIR)\term2.obj $(OBJDIR)\tuple.obj $(OBJDIR)\vinst.obj $(OBJDIR)\zimpllib.obj
LIBOBJ = $(LIBBASE) $(OBJDIR)\gmpmisc.obj $(OBJDIR)\numbgmp.obj
#-----------------------------------------------------------------------------
!include make/nmake.$(OSTYPE).$(ARCH).$(COMP).$(OPT)
#-----------------------------------------------------------------------------
!if $(VERBOSE) == 0
!CMDSWITCHES +S
!endif
all: $(LIBRARY) $(BINARY)
$(BINARY): $(OBJDIR) $(BINDIR) $(OBJECT) $(LIBRARY)
@echo "-> linking $@"
$(LD) $(LDFLAGS) /OUT:$@ $(OBJECT) $(LIBRARY) $(LIBS)
$(LIBRARY): $(OBJDIR) $(LIBDIR) $(LIBOBJ)
@echo "-> generating library $@"
@del $(LIBRARY)
$(AR) $(ARFLAGS) /OUT:$@ $(LIBOBJ)
$(OBJDIR):
@echo "** creating directory \"$@\""
@mkdir $(OBJDIR)
$(LIBDIR):
@echo "** creating directory \"$@\""
@mkdir $(LIBDIR)
$(BINDIR):
@echo "** creating directory \"$@\""
@mkdir $(BINDIR)
clean:
del /Q $(OBJDIR)\*.* $(BINARY) $(LIBRARY)
!include $(DEPEND)
{$(SRCDIR)}.c{$(OBJDIR)}.obj:
@echo "-> compiling $@"
$(CC) $(CPPFLAGS) $(CFLAGS) /c $< /Fo$@
$(OBJDIR)\getopt.obj: $(SRCDIR)\WIN\getopt.c $(SRCDIR)\WIN\getopt.h
$(CC) $(CPPFLAGS) $(CFLAGS) /c $(SRCDIR)\WIN\getopt.c /Fo$@
# --- EOF ---------------------------------------------------------------------