Home | History | Annotate | Download | only in sysdump
      1 ## -----------------------------------------------------------------------
      2 ##
      3 ##   Copyright 2001-2008 H. Peter Anvin - All Rights Reserved
      4 ##   Copyright 2010 Intel Corporation; author: H. Peter Anvin
      5 ##
      6 ##   This program is free software; you can redistribute it and/or modify
      7 ##   it under the terms of the GNU General Public License as published by
      8 ##   the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
      9 ##   Boston MA 02110-1301, USA; either version 2 of the License, or
     10 ##   (at your option) any later version; incorporated herein by reference.
     11 ##
     12 ## -----------------------------------------------------------------------
     13 
     14 ##
     15 ## Simple menu system
     16 ##
     17 
     18 VPATH = $(SRC)
     19 include $(MAKEDIR)/elf.mk
     20 -include $(topdir)/version.mk
     21 
     22 LIBS	   = $(objdir)/com32/libupload/libcom32upload.a
     23 LNXLIBS	   = $(objdir)/com32/libutil/libutil_lnx.a
     24 
     25 CFLAGS += -I$(com32) -I$(topdir)
     26 
     27 MODULES	  = sysdump.c32
     28 TESTFILES =
     29 
     30 SRCS = $(wildcard $(SRC)/*.c)
     31 OBJS = $(subst $(SRC)/,,$(patsubst %.c,%.o,$(SRCS)))
     32 
     33 # The DATE is set on the make command line when building binaries for
     34 # official release.  Otherwise, substitute a hex string that is pretty much
     35 # guaranteed to be unique to be unique from build to build.
     36 ifndef HEXDATE
     37 HEXDATE := $(shell $(PERL) $(topdir)/now.pl $(SRCS) $(wildcard *.h))
     38 endif
     39 ifndef DATE
     40 DATE    := $(shell sh $(topdir)/gen-id.sh $(VERSION) $(HEXDATE))
     41 endif
     42 
     43 CFLAGS    += -DDATE='"$(DATE)"'
     44 
     45 all: $(MODULES) $(TESTFILES)
     46 
     47 sysdump.elf : $(OBJS) $(LIBS) $(C_LIBS)
     48 	$(LD) $(LDFLAGS) -o $@ $^
     49 
     50 tidy dist:
     51 	rm -f *.o *.lo *.a *.lst .*.d *.tmp
     52 
     53 clean: tidy
     54 	rm -f *.lnx
     55 
     56 spotless: clean
     57 	rm -f *.lss *.c32 *.com
     58 	rm -f *~ \#*
     59 
     60 install:
     61 
     62 -include .*.d
     63