• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
18VPATH = $(SRC)
19include $(MAKEDIR)/elf.mk
20-include $(topdir)/version.mk
21
22LIBS	   = $(objdir)/com32/libupload/libcom32upload.a
23LNXLIBS	   = $(objdir)/com32/libutil/libutil_lnx.a
24
25CFLAGS += -I$(com32) -I$(topdir)
26
27MODULES	  = sysdump.c32
28TESTFILES =
29
30SRCS = $(wildcard $(SRC)/*.c)
31OBJS = $(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.
36ifndef HEXDATE
37HEXDATE := $(shell $(PERL) $(topdir)/now.pl $(SRCS) $(wildcard *.h))
38endif
39ifndef DATE
40DATE    := $(shell sh $(topdir)/gen-id.sh $(VERSION) $(HEXDATE))
41endif
42
43CFLAGS    += -DDATE='"$(DATE)"'
44
45all: $(MODULES) $(TESTFILES)
46
47sysdump.elf : $(OBJS) $(LIBS) $(C_LIBS)
48	$(LD) $(LDFLAGS) -o $@ $^
49
50tidy dist:
51	rm -f *.o *.lo *.a *.lst .*.d *.tmp
52
53clean: tidy
54	rm -f *.lnx
55
56spotless: clean
57	rm -f *.lss *.c32 *.com
58	rm -f *~ \#*
59
60install:
61
62-include .*.d
63