blob: e2d432114dbc5d852abf95b8d53b22bb9eaa925a (
plain)
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
|
## @file
# GNU/Linux makefile for 'VfrCompile' module build.
#
# Copyright (c) 2008 - 2016, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
ARCH ?= IA32
MAKEROOT ?= ..
APPNAME = VfrCompile
LIBS = -lCommon
TOOL_INCLUDE = -I Pccts/h
#OBJECTS = VfrSyntax.o VfrServices.o DLGLexer.o EfiVfrParser.o ATokenBuffer.o DLexerBase.o AParser.o
OBJECTS = AParser.o DLexerBase.o ATokenBuffer.o EfiVfrParser.o VfrLexer.o VfrSyntax.o \
VfrFormPkg.o VfrError.o VfrUtilityLib.o VfrCompiler.o
VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(BUILD_CPPFLAGS)
LINKER = $(CXX)
EXTRA_CLEAN_OBJECTS = EfiVfrParser.cpp EfiVfrParser.h VfrParser.dlg VfrTokens.h VfrLexer.cpp VfrLexer.h VfrSyntax.cpp tokens.h
MAKEROOT ?= ../..
include $(MAKEROOT)/Makefiles/header.makefile
APPLICATION = $(MAKEROOT)/bin/$(APPNAME)
.PHONY:all
all: $(MAKEROOT)/bin $(APPLICATION)
$(APPLICATION): $(OBJECTS)
$(LINKER) -o $(APPLICATION) $(LFLAGS) $(OBJECTS) -L$(MAKEROOT)/libs $(LIBS)
VfrCompiler.o: ../Include/Common/BuildVersion.h
include $(MAKEROOT)/Makefiles/footer.makefile
VfrSyntax.cpp EfiVfrParser.cpp EfiVfrParser.h VfrParser.dlg VfrTokens.h: Pccts/antlr/antlr VfrSyntax.g
Pccts/antlr/antlr -CC -e3 -ck 3 -k 2 -fl VfrParser.dlg -ft VfrTokens.h -o . VfrSyntax.g
VfrLexer.cpp VfrLexer.h: Pccts/dlg/dlg VfrParser.dlg
Pccts/dlg/dlg -C2 -i -CC -cl VfrLexer -o . VfrParser.dlg
Pccts/antlr/antlr:
BIN_DIR='.' $(MAKE) -C Pccts/antlr
Pccts/dlg/dlg:
BIN_DIR='.' $(MAKE) -C Pccts/dlg
ATokenBuffer.o: Pccts/h/ATokenBuffer.cpp
$(CXX) -c $(VFR_CPPFLAGS) $(INC) $? -o $@
DLexerBase.o: Pccts/h/DLexerBase.cpp
$(CXX) -c $(VFR_CPPFLAGS) $(INC) $? -o $@
AParser.o: Pccts/h/AParser.cpp
$(CXX) -c $(VFR_CPPFLAGS) $(INC) $? -o $@
VfrSyntax.o: VfrSyntax.cpp
$(CXX) -c $(VFR_CPPFLAGS) $(INC) $? -o $@
clean: localClean
localClean:
BIN_DIR='.' $(MAKE) -C Pccts/antlr clean
BIN_DIR='.' $(MAKE) -C Pccts/dlg clean
rm -f $(EXTRA_CLEAN_OBJECTS)
|