Makefile revision 1.1.1.2
11.1Sjakllsch# 21.1Sjakllsch# Copyright (C) 1999-2001 Hewlett-Packard Co. 31.1Sjakllsch# Contributed by David Mosberger <davidm@hpl.hp.com> 41.1Sjakllsch# Contributed by Stephane Eranian <eranian@hpl.hp.com> 51.1Sjakllsch# 61.1Sjakllsch# All rights reserved. 71.1Sjakllsch# 81.1Sjakllsch# Redistribution and use in source and binary forms, with or without 91.1Sjakllsch# modification, are permitted provided that the following conditions 101.1Sjakllsch# are met: 111.1Sjakllsch# 121.1Sjakllsch# * Redistributions of source code must retain the above copyright 131.1Sjakllsch# notice, this list of conditions and the following disclaimer. 141.1Sjakllsch# * Redistributions in binary form must reproduce the above 151.1Sjakllsch# copyright notice, this list of conditions and the following 161.1Sjakllsch# disclaimer in the documentation and/or other materials 171.1Sjakllsch# provided with the distribution. 181.1Sjakllsch# * Neither the name of Hewlett-Packard Co. nor the names of its 191.1Sjakllsch# contributors may be used to endorse or promote products derived 201.1Sjakllsch# from this software without specific prior written permission. 211.1Sjakllsch# 221.1Sjakllsch# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 231.1Sjakllsch# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 241.1Sjakllsch# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 251.1Sjakllsch# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 261.1Sjakllsch# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 271.1Sjakllsch# BE LIABLE FOR ANYDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 281.1Sjakllsch# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 291.1Sjakllsch# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 301.1Sjakllsch# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 311.1Sjakllsch# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 321.1Sjakllsch# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 331.1Sjakllsch# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 341.1Sjakllsch# SUCH DAMAGE. 351.1Sjakllsch# 361.1Sjakllsch 371.1SjakllschSRCDIR = . 381.1Sjakllsch 391.1SjakllschVPATH = $(SRCDIR) 401.1Sjakllsch 411.1Sjakllschinclude $(SRCDIR)/../Make.defaults 421.1Sjakllsch 431.1SjakllschTOPDIR = $(SRCDIR)/.. 441.1Sjakllsch 451.1SjakllschCDIR=$(TOPDIR)/.. 461.1SjakllschLINUX_HEADERS = /usr/src/sys/build 471.1SjakllschCPPFLAGS += -D__KERNEL__ -I$(LINUX_HEADERS)/include 481.1SjakllschCRTOBJS = ../gnuefi/crt0-efi-$(ARCH).o 491.1Sjakllsch 501.1SjakllschLDSCRIPT = $(TOPDIR)/gnuefi/elf_$(ARCH)_efi.lds 511.1Sjakllschifneq (,$(findstring FreeBSD,$(OS))) 521.1SjakllschLDSCRIPT = $(TOPDIR)/gnuefi/elf_$(ARCH)_fbsd_efi.lds 531.1Sjakllschendif 541.1Sjakllsch 551.1.1.2SjmcneillLDFLAGS += -shared -Bsymbolic -L../lib -L../gnuefi $(CRTOBJS) 561.1Sjakllsch 571.1.1.2SjmcneillLOADLIBES += -lefi -lgnuefi 581.1.1.2SjmcneillLOADLIBES += $(LIBGCC) 591.1.1.2SjmcneillLOADLIBES += -T $(LDSCRIPT) 601.1.1.2Sjmcneill 611.1.1.2SjmcneillTARGET_APPS = t.efi t2.efi t3.efi t4.efi t5.efi t6.efi \ 621.1.1.2Sjmcneill printenv.efi t7.efi t8.efi tcc.efi modelist.efi \ 631.1.1.2Sjmcneill route80h.efi drv0_use.efi AllocPages.efi exit.efi \ 641.1.1.2Sjmcneill FreePages.efi setjmp.efi debughook.efi debughook.efi.debug \ 651.1.1.2Sjmcneill bltgrid.efi lfbgrid.efi setdbg.efi unsetdbg.efi 661.1.1.2SjmcneillTARGET_BSDRIVERS = drv0.efi 671.1.1.2SjmcneillTARGET_RTDRIVERS = 681.1.1.2Sjmcneill 691.1.1.2Sjmcneillifneq ($(HAVE_EFI_OBJCOPY),) 701.1.1.2Sjmcneill 711.1.1.2SjmcneillFORMAT := --target efi-app-$(ARCH) 721.1.1.2Sjmcneill$(TARGET_BSDRIVERS): FORMAT=--target efi-bsdrv-$(ARCH) 731.1.1.2Sjmcneill$(TARGET_RTDRIVERS): FORMAT=--target efi-rtdrv-$(ARCH) 741.1.1.2Sjmcneill 751.1.1.2Sjmcneillelse 761.1.1.2Sjmcneill 771.1.1.2SjmcneillSUBSYSTEM := 0xa 781.1.1.2Sjmcneill$(TARGET_BSDRIVERS): SUBSYSTEM = 0xb 791.1.1.2Sjmcneill$(TARGET_RTDRIVERS): SUBSYSTEM = 0xc 801.1.1.2Sjmcneill 811.1.1.2SjmcneillFORMAT := -O binary 821.1.1.2SjmcneillLDFLAGS += --defsym=EFI_SUBSYSTEM=$(SUBSYSTEM) 831.1.1.2Sjmcneill 841.1.1.2Sjmcneillendif 851.1.1.2Sjmcneill 861.1.1.2SjmcneillTARGETS = $(TARGET_APPS) $(TARGET_BSDRIVERS) $(TARGET_RTDRIVERS) 871.1Sjakllsch 881.1Sjakllschall: $(TARGETS) 891.1Sjakllsch 901.1Sjakllschclean: 911.1Sjakllsch rm -f $(TARGETS) *~ *.o *.so 921.1Sjakllsch 931.1Sjakllsch.PHONY: install 941.1Sjakllsch 951.1Sjakllschinclude $(SRCDIR)/../Make.rules 96