Imported Debian patch 0.5.3-1
[debian/efibootmgr] / Makefile
1   default: all
2
3   RELEASE_DATE := "09-Nov-2005"
4   RELEASE_MAJOR := 0
5   RELEASE_MINOR := 5
6   RELEASE_SUBLEVEL := 3
7   RELEASE_EXTRALEVEL :=
8   RELEASE_NAME := efibootmgr
9   RELEASE_STRING := $(RELEASE_NAME)-$(RELEASE_MAJOR).$(RELEASE_MINOR).$(RELEASE_SUBLEVEL)$(RELEASE_EXTRALEVEL)
10
11   CFLAGS += -DEFIBOOTMGR_VERSION=\"$(RELEASE_MAJOR).$(RELEASE_MINOR).$(RELEASE_SUBLEVEL)$(RELEASE_EXTRALEVEL)\" \
12             -Wall -g -D_FILE_OFFSET_BITS=64
13
14   MODULES := src
15
16   BINDIR := /usr/sbin
17
18 #--------------------------------------------
19 # Generic Makefile stuff is below. You
20 #  should not have to modify any of the stuff
21 #  below.
22 #--------------------------------------------
23
24 #Included makefiles will add their deps for each stage in these vars:
25   INSTALLDEPS :=
26   CLEANDEPS :=
27   ALLDEPS :=
28   CLEANLIST :=
29
30 #Define the top-level build directory
31   BUILDDIR := $(shell pwd)
32
33 #Include make rules from each submodule (subdirectory)
34   include $(patsubst %,%/module.mk,$(MODULES))
35
36   .PHONY: all clean install_list install install_link post_install tarball echotree default
37
38   all:  $(ALLDEPS) 
39   clean: clean_list $(CLEANDEPS) 
40
41   clean_list:
42         rm -f $(CLEANLIST)
43
44   install_list: echotree $(INSTALLDEPS) 
45
46   install: all 
47         @make install_list | tools/install.pl copy
48
49   install_link: all
50         @make install_list | tools/install.pl link
51
52   post_install: 
53
54   tarball: clean
55         -rm $(RELEASE_NAME)*.tar.gz
56         cp -a ../$(RELEASE_NAME) ../$(RELEASE_STRING)
57         find ../$(RELEASE_STRING) -name CVS -type d -depth -exec rm -rf \{\} \;
58         sync; sync; sync;
59         cd ..; tar cvzf $(RELEASE_STRING).tar.gz $(RELEASE_STRING)
60         mv ../$(RELEASE_STRING).tar.gz .
61         rm -rf ../$(RELEASE_STRING)
62
63
64 #The rest of the docs...
65   doc_TARGETS += COPYING README INSTALL
66
67 echotree:
68         @# making directory tree 
69         @#RPM FORMAT:
70         @# %defattr(-, user, group) 
71         @# %attr(4755,user,group)  filename
72         @# filename
73
74 # Here is a list of variables that are assumed Local to each Makefile. You can
75 #   safely stomp on these values without affecting the build.
76 #       MODULES
77 #       FILES
78 #       TARGETS
79 #       SOURCES