Debian Codegraph @

engine/read_only/Makefile.win32

raw
1 # Copyright 2022 Jeffrey Kegler
2 # Permission is hereby granted, free of charge, to any person obtaining a
3 # copy of this software and associated documentation files (the "Software"),
4 # to deal in the Software without restriction, including without limitation
5 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 # and/or sell copies of the Software, and to permit persons to whom the
7 # Software is furnished to do so, subject to the following conditions:
8 #
9 # The above copyright notice and this permission notice shall be included
10 # in all copies or substantial portions of the Software.
11 #
12 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
15 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
16 # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
18 # OTHER DEALINGS IN THE SOFTWARE.
19
20 # Build static and dynamic libraries of Marpa, using a config.h generated with
21 # Marpa::R2::Build_Me
22
23 # You should make sure that you have fairly recent: MSVC, perl,
24 # Config::AutoConf, and execute this Makefile as follows after
25 # changing to this directory in a command shell where all MSVC
26 # environment variables are set:
27 #
28 # set /p MARPA_VERSION= <LIB_VERSION & nmake -fMakefile.win32
29 #
30
31 CC = cl
32 CFLAGS = /c /Gy /DWIN32 /MD
33 LD = link
34 CP = copy
35 CPFLAGS = /Y
36 RM = del
37 MT = mt
38 RM_FLAGS = /Q
39 MARPA_DEF = win32\marpa.def
40 MARPA_OBJS = marpa.obj marpa_ami.obj marpa_obs.obj marpa_avl.obj
41 MARPA_DLL = libmarpa.dll
42
43 LDFLAGS = /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB:"LIBCMTD.LIB" /DLL /DEF:$(MARPA_DEF) /VERSION:%%MARPA_VERSION%%
44
45 .c.obj:
46 $(CC) $(CFLAGS) /Fo$@ $<
47
48 all: $(MARPA_DLL)
49
50 $(MARPA_DLL): config.h $(MARPA_OBJS)
51 $(LD) $(LDFLAGS) /OUT:$@ $(MARPA_OBJS)
52 if exist $(MARPA_DLL).manifest mt -nologo -manifest $(MARPA_DLL).manifest -outputresource:$(MARPA_DLL);2
53
54 config.h:
55 perl win32\do_config_h.pl --cc="$(CC)" --ccflags="$(CFLAGS)" --obj_ext=".obj"
56
57 clean:
58 $(RM) $(RM_FLAGS) *.obj
59 $(RM) $(RM_FLAGS) *.exp
60
61 distclean: clean
62 $(RM) $(RM_FLAGS) *.dll
63 $(RM) $(RM_FLAGS) *.lib
64
65 mrproper: distclean