Home | History | Annotate | Download | only in VfrCompile
      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 
     14 ARCH ?= IA32
     15 MAKEROOT ?= ..
     16 
     17 APPNAME = VfrCompile
     18 
     19 LIBS = -lCommon
     20 
     21 TOOL_INCLUDE = -I Pccts/h
     22 
     23 #OBJECTS = VfrSyntax.o VfrServices.o DLGLexer.o EfiVfrParser.o ATokenBuffer.o DLexerBase.o AParser.o

     24 OBJECTS = AParser.o DLexerBase.o ATokenBuffer.o EfiVfrParser.o VfrLexer.o VfrSyntax.o \
     25           VfrFormPkg.o VfrError.o VfrUtilityLib.o VfrCompiler.o
     26 
     27 VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(BUILD_CPPFLAGS)
     28 
     29 LINKER = $(BUILD_CXX)
     30 
     31 EXTRA_CLEAN_OBJECTS = EfiVfrParser.cpp EfiVfrParser.h VfrParser.dlg VfrTokens.h VfrLexer.cpp VfrLexer.h VfrSyntax.cpp tokens.h
     32 
     33 MAKEROOT ?= ../..
     34 
     35 include $(MAKEROOT)/Makefiles/header.makefile
     36 
     37 APPLICATION = $(MAKEROOT)/bin/$(APPNAME)
     38 
     39 .PHONY:all
     40 all: $(MAKEROOT)/bin $(APPLICATION) 
     41 
     42 $(APPLICATION): $(OBJECTS) 
     43 	$(LINKER) -o $(APPLICATION) $(LFLAGS) $(OBJECTS) -L$(MAKEROOT)/libs $(LIBS)
     44 
     45 VfrCompiler.o: ../Include/Common/BuildVersion.h
     46 
     47 include $(MAKEROOT)/Makefiles/footer.makefile
     48 
     49 VfrSyntax.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 
     52 VfrLexer.cpp VfrLexer.h: Pccts/dlg/dlg VfrParser.dlg
     53 	Pccts/dlg/dlg -C2 -i -CC -cl VfrLexer -o . VfrParser.dlg
     54 
     55 Pccts/antlr/antlr:
     56 	BIN_DIR='.' $(MAKE) -C Pccts/antlr
     57 
     58 Pccts/dlg/dlg:
     59 	BIN_DIR='.' $(MAKE) -C Pccts/dlg
     60 
     61 ATokenBuffer.o: Pccts/h/ATokenBuffer.cpp
     62 	$(BUILD_CXX) -c $(VFR_CPPFLAGS) $(INC) $? -o $@
     63 
     64 DLexerBase.o: Pccts/h/DLexerBase.cpp
     65 	$(BUILD_CXX) -c $(VFR_CPPFLAGS) $(INC) $? -o $@
     66 
     67 AParser.o: Pccts/h/AParser.cpp
     68 	$(BUILD_CXX) -c $(VFR_CPPFLAGS) $(INC) $? -o $@
     69 
     70 VfrSyntax.o: VfrSyntax.cpp
     71 	$(BUILD_CXX) -c $(VFR_CPPFLAGS) $(INC) $? -o $@
     72 	
     73 clean: localClean
     74 
     75 localClean:
     76 	BIN_DIR='.' $(MAKE) -C Pccts/antlr clean
     77 	BIN_DIR='.' $(MAKE) -C Pccts/dlg clean
     78 	rm -f $(EXTRA_CLEAN_OBJECTS)
     79 
     80