]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/C/Makefiles/footer.makefile
BaseTools GNU makefile: Add BUILD_CXXFLAGS to align make built-in rule
[mirror_edk2.git] / BaseTools / Source / C / Makefiles / footer.makefile
1 ## @file
2 # Makefile
3 #
4 # Copyright (c) 2007 - 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 DEPFILES = $(OBJECTS:%.o=%.d)
15
16 $(MAKEROOT)/libs-$(ARCH):
17 mkdir -p $(MAKEROOT)/libs-$(ARCH)
18
19 .PHONY: install
20 install: $(MAKEROOT)/libs-$(ARCH) $(LIBRARY)
21 cp $(LIBRARY) $(MAKEROOT)/libs-$(ARCH)
22
23 $(LIBRARY): $(OBJECTS)
24 $(BUILD_AR) crs $@ $^
25
26 %.o : %.c
27 $(BUILD_CC) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
28
29 %.o : %.S
30 $(BUILD_AS) -c $(BUILD_ASFLAGS) $< -o $@
31
32 %.o : %.cpp
33 $(BUILD_CXX) -c $(BUILD_CPPFLAGS) $(BUILD_CXXFLAGS) $< -o $@
34
35 .PHONY: clean
36 clean:
37 @rm -f $(OBJECTS) $(LIBRARY) $(DEPFILES)
38
39 -include $(DEPFILES)