Home | History | Annotate | Line # | Download | only in apps
Makefile revision 1.1.1.1.36.1
      1           1.1  jakllsch #
      2           1.1  jakllsch #  Copyright (C) 1999-2001 Hewlett-Packard Co.
      3           1.1  jakllsch #	Contributed by David Mosberger <davidm (at] hpl.hp.com>
      4           1.1  jakllsch #	Contributed by Stephane Eranian <eranian (at] hpl.hp.com>
      5           1.1  jakllsch #
      6           1.1  jakllsch #    All rights reserved.
      7           1.1  jakllsch #
      8           1.1  jakllsch #    Redistribution and use in source and binary forms, with or without
      9           1.1  jakllsch #    modification, are permitted provided that the following conditions
     10           1.1  jakllsch #    are met:
     11           1.1  jakllsch #
     12           1.1  jakllsch #    * Redistributions of source code must retain the above copyright
     13           1.1  jakllsch #      notice, this list of conditions and the following disclaimer.
     14           1.1  jakllsch #    * Redistributions in binary form must reproduce the above
     15           1.1  jakllsch #      copyright notice, this list of conditions and the following
     16           1.1  jakllsch #      disclaimer in the documentation and/or other materials
     17           1.1  jakllsch #      provided with the distribution.
     18           1.1  jakllsch #    * Neither the name of Hewlett-Packard Co. nor the names of its
     19           1.1  jakllsch #      contributors may be used to endorse or promote products derived
     20           1.1  jakllsch #      from this software without specific prior written permission.
     21           1.1  jakllsch #
     22           1.1  jakllsch #    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
     23           1.1  jakllsch #    CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
     24           1.1  jakllsch #    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     25           1.1  jakllsch #    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
     26           1.1  jakllsch #    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
     27           1.1  jakllsch #    BE LIABLE FOR ANYDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
     28           1.1  jakllsch #    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     29           1.1  jakllsch #    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
     30           1.1  jakllsch #    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     31           1.1  jakllsch #    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
     32           1.1  jakllsch #    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
     33           1.1  jakllsch #    THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     34           1.1  jakllsch #    SUCH DAMAGE.
     35           1.1  jakllsch #
     36           1.1  jakllsch 
     37           1.1  jakllsch SRCDIR = .
     38           1.1  jakllsch 
     39           1.1  jakllsch VPATH = $(SRCDIR)
     40           1.1  jakllsch 
     41           1.1  jakllsch include $(SRCDIR)/../Make.defaults
     42           1.1  jakllsch 
     43           1.1  jakllsch TOPDIR = $(SRCDIR)/..
     44           1.1  jakllsch 
     45           1.1  jakllsch CDIR=$(TOPDIR)/..
     46           1.1  jakllsch LINUX_HEADERS	= /usr/src/sys/build
     47           1.1  jakllsch CPPFLAGS	+= -D__KERNEL__ -I$(LINUX_HEADERS)/include
     48           1.1  jakllsch CRTOBJS		= ../gnuefi/crt0-efi-$(ARCH).o
     49           1.1  jakllsch 
     50           1.1  jakllsch LDSCRIPT	= $(TOPDIR)/gnuefi/elf_$(ARCH)_efi.lds
     51           1.1  jakllsch ifneq (,$(findstring FreeBSD,$(OS)))
     52           1.1  jakllsch LDSCRIPT	= $(TOPDIR)/gnuefi/elf_$(ARCH)_fbsd_efi.lds
     53           1.1  jakllsch endif
     54           1.1  jakllsch 
     55  1.1.1.1.36.1  christos LDFLAGS		+= -shared -Bsymbolic -L../lib -L../gnuefi $(CRTOBJS)
     56           1.1  jakllsch 
     57  1.1.1.1.36.1  christos LOADLIBES	+= -lefi -lgnuefi
     58  1.1.1.1.36.1  christos LOADLIBES	+= $(LIBGCC)
     59  1.1.1.1.36.1  christos LOADLIBES	+= -T $(LDSCRIPT)
     60  1.1.1.1.36.1  christos 
     61  1.1.1.1.36.1  christos TARGET_APPS = t.efi t2.efi t3.efi t4.efi t5.efi t6.efi \
     62  1.1.1.1.36.1  christos 	      printenv.efi t7.efi t8.efi tcc.efi modelist.efi \
     63  1.1.1.1.36.1  christos 	      route80h.efi drv0_use.efi AllocPages.efi exit.efi \
     64  1.1.1.1.36.1  christos 	      FreePages.efi setjmp.efi debughook.efi debughook.efi.debug \
     65  1.1.1.1.36.1  christos 	      bltgrid.efi lfbgrid.efi setdbg.efi unsetdbg.efi
     66  1.1.1.1.36.1  christos TARGET_BSDRIVERS = drv0.efi
     67  1.1.1.1.36.1  christos TARGET_RTDRIVERS =
     68  1.1.1.1.36.1  christos 
     69  1.1.1.1.36.1  christos ifneq ($(HAVE_EFI_OBJCOPY),)
     70  1.1.1.1.36.1  christos 
     71  1.1.1.1.36.1  christos FORMAT		:= --target efi-app-$(ARCH)
     72  1.1.1.1.36.1  christos $(TARGET_BSDRIVERS): FORMAT=--target efi-bsdrv-$(ARCH)
     73  1.1.1.1.36.1  christos $(TARGET_RTDRIVERS): FORMAT=--target efi-rtdrv-$(ARCH)
     74  1.1.1.1.36.1  christos 
     75  1.1.1.1.36.1  christos else
     76  1.1.1.1.36.1  christos 
     77  1.1.1.1.36.1  christos SUBSYSTEM	:= 0xa
     78  1.1.1.1.36.1  christos $(TARGET_BSDRIVERS): SUBSYSTEM = 0xb
     79  1.1.1.1.36.1  christos $(TARGET_RTDRIVERS): SUBSYSTEM = 0xc
     80  1.1.1.1.36.1  christos 
     81  1.1.1.1.36.1  christos FORMAT		:= -O binary
     82  1.1.1.1.36.1  christos LDFLAGS		+= --defsym=EFI_SUBSYSTEM=$(SUBSYSTEM)
     83  1.1.1.1.36.1  christos 
     84  1.1.1.1.36.1  christos endif
     85  1.1.1.1.36.1  christos 
     86  1.1.1.1.36.1  christos TARGETS = $(TARGET_APPS) $(TARGET_BSDRIVERS) $(TARGET_RTDRIVERS)
     87           1.1  jakllsch 
     88           1.1  jakllsch all:	$(TARGETS)
     89           1.1  jakllsch 
     90           1.1  jakllsch clean:
     91           1.1  jakllsch 	rm -f $(TARGETS) *~ *.o *.so
     92           1.1  jakllsch 
     93           1.1  jakllsch .PHONY: install
     94           1.1  jakllsch 
     95           1.1  jakllsch include $(SRCDIR)/../Make.rules
     96