• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## @file
2# GNU/Linux makefile for 'VfrCompile' module build.
3#
4# Copyright (c) 2008 - 2016, Intel Corporation. All rights reserved.<BR>
5# This program and the accompanying materials
6# are licensed and made available under the terms and conditions of the BSD License
7# which accompanies this distribution.  The full text of the license may be found at
8# http://opensource.org/licenses/bsd-license.php
9#
10# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12#
13
14ARCH ?= IA32
15MAKEROOT ?= ..
16
17APPNAME = VfrCompile
18
19LIBS = -lCommon
20
21TOOL_INCLUDE = -I Pccts/h
22
23#OBJECTS = VfrSyntax.o VfrServices.o DLGLexer.o EfiVfrParser.o ATokenBuffer.o DLexerBase.o AParser.o
24OBJECTS = AParser.o DLexerBase.o ATokenBuffer.o EfiVfrParser.o VfrLexer.o VfrSyntax.o \
25          VfrFormPkg.o VfrError.o VfrUtilityLib.o VfrCompiler.o
26
27VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(BUILD_CPPFLAGS)
28
29LINKER = $(BUILD_CXX)
30
31EXTRA_CLEAN_OBJECTS = EfiVfrParser.cpp EfiVfrParser.h VfrParser.dlg VfrTokens.h VfrLexer.cpp VfrLexer.h VfrSyntax.cpp tokens.h
32
33MAKEROOT ?= ../..
34
35include $(MAKEROOT)/Makefiles/header.makefile
36
37APPLICATION = $(MAKEROOT)/bin/$(APPNAME)
38
39.PHONY:all
40all: $(MAKEROOT)/bin $(APPLICATION)
41
42$(APPLICATION): $(OBJECTS)
43	$(LINKER) -o $(APPLICATION) $(LFLAGS) $(OBJECTS) -L$(MAKEROOT)/libs $(LIBS)
44
45VfrCompiler.o: ../Include/Common/BuildVersion.h
46
47include $(MAKEROOT)/Makefiles/footer.makefile
48
49VfrSyntax.cpp EfiVfrParser.cpp EfiVfrParser.h VfrParser.dlg VfrTokens.h: Pccts/antlr/antlr VfrSyntax.g
50	Pccts/antlr/antlr -CC -e3 -ck 3 -k 2 -fl VfrParser.dlg -ft VfrTokens.h -o . VfrSyntax.g
51
52VfrLexer.cpp VfrLexer.h: Pccts/dlg/dlg VfrParser.dlg
53	Pccts/dlg/dlg -C2 -i -CC -cl VfrLexer -o . VfrParser.dlg
54
55Pccts/antlr/antlr:
56	BIN_DIR='.' $(MAKE) -C Pccts/antlr
57
58Pccts/dlg/dlg:
59	BIN_DIR='.' $(MAKE) -C Pccts/dlg
60
61ATokenBuffer.o: Pccts/h/ATokenBuffer.cpp
62	$(BUILD_CXX) -c $(VFR_CPPFLAGS) $(INC) $? -o $@
63
64DLexerBase.o: Pccts/h/DLexerBase.cpp
65	$(BUILD_CXX) -c $(VFR_CPPFLAGS) $(INC) $? -o $@
66
67AParser.o: Pccts/h/AParser.cpp
68	$(BUILD_CXX) -c $(VFR_CPPFLAGS) $(INC) $? -o $@
69
70VfrSyntax.o: VfrSyntax.cpp
71	$(BUILD_CXX) -c $(VFR_CPPFLAGS) $(INC) $? -o $@
72
73clean: localClean
74
75localClean:
76	BIN_DIR='.' $(MAKE) -C Pccts/antlr clean
77	BIN_DIR='.' $(MAKE) -C Pccts/dlg clean
78	rm -f $(EXTRA_CLEAN_OBJECTS)
79
80