File: Makefile

package info (click to toggle)
wmmaiload 2.2.1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 436 kB
  • ctags: 480
  • sloc: ansic: 4,043; makefile: 204; sh: 76
file content (92 lines) | stat: -rw-r--r-- 2,476 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
##################################################################
#                                                                #
# Makefile (generic program creation Makefile)                   #
#                                                                #
# Thomas Nemeth.                                                 #
#                                                                #
##################################################################


##################################################################
#                                                                #
#            PARTIE DES VARIABLES NON MODIFIABLES !              #
#              NO MODIFICATION BELOW THIS LINE !                 #
#                                                                #
##################################################################

include Init.make


#*****************************************************************
# DIRECTORIES :
#

TOPDIR  = $(PWD)
BASEDIR = $(shell basename $(PWD))


#*****************************************************************
# COMMON COMMANDS :
#

CPP		 = $(CROSS_COMPILE)cpp
CC               = $(CROSS_COMPILE)gcc
AR		 = $(CROSS_COMPILE)ar
LD		 = $(CROSS_COMPILE)ld
STRIP		 = $(CROSS_COMPILE)strip
CP               = cp
MV               = mv
RM               = rm
INSTALL          = install
TAR              = tar
GZIP             = gzip
SED              = sed


##################################################################
# RULES :
#

.PHONY: all install install-strip clean mrproper

all:
	@for dir in ${SUBDIRS}; do \
		echo "Making all in $$dir..." ; \
		$(MAKE) -C $$dir all ; \
	done

install:
	@for dir in ${SUBDIRS}; do \
		echo "Making install in $$dir..." ; \
		$(MAKE) -C $$dir install ; \
	done

install-strip:
	@for dir in ${SUBDIRS}; do \
		echo "Making install-strip in $$dir..." ; \
		$(MAKE) -C $$dir install-strip ; \
	done

clean:
	@for dir in ${SUBDIRS}; do \
		echo "Making clean in $$dir..." ; \
		$(MAKE) -C $$dir clean ; \
	done
	@rm -f Config.make

mrproper: local_clean
	@for dir in ${SUBDIRS}; do \
		echo "Making mrproper in $$dir..." ; \
		$(MAKE) -C $$dir mrproper ; \
	done

package: mrproper
	@-$(RM) -f ../$(PROGRAM)-$(VERSION).tar.gz
	@cd .. ; \
	  if [ ! -d $(PROGRAM)-$(VERSION) ] ; then \
	    $(MV) $(BASEDIR) $(PROGRAM)-$(VERSION) ; \
	  fi ; \
	  $(TAR) -cf $(PROGRAM)-$(VERSION).tar $(PROGRAM)-$(VERSION) ; \
	  $(GZIP) -9 $(PROGRAM)-$(VERSION).tar