File: Makefile

package info (click to toggle)
delo 0.8-2.5
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 476 kB
  • ctags: 1,272
  • sloc: ansic: 4,027; makefile: 200; sh: 141; asm: 55
file content (36 lines) | stat: -rw-r--r-- 1,388 bytes parent folder | download | duplicates (4)
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
#
# This file is licensed under the terms of the GNU General Public License,
# version 2. See the file COPYING in the main directory for details.
#
# Copyright (C) 2003  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
#

#
# We build the loader binaries only if we are compiling for a mipsel-linux
# machine. Otherwise we build only the installer. This is useful to make
# CDs, disks and other media bootable on non-mipsel machines.
#
add_native = $(shell if [ $$($(CC) -dumpmachine) = "mipsel-linux" ]; then echo "$(1)"; fi)

SUBDIRS = delo t-rex $(call add_native, loader t-rex-loader)

.PHONY = all $(patsubst %, _dir_%, $(SUBDIRS))
all: $(patsubst %, _dir_%, $(SUBDIRS))
$(patsubst %, _dir_%, $(SUBDIRS)):
	$(MAKE) -C $(patsubst _dir_%, %, $@) all

.PHONY = install $(patsubst %, _instdir_%, $(SUBDIRS))
install: $(patsubst %, _instdir_%, $(SUBDIRS))
$(patsubst %, _instdir_%, $(SUBDIRS)):
	$(MAKE) -C $(patsubst _instdir_%, %, $@) install

.PHONY = clean $(patsubst %, _cleandir_%, $(SUBDIRS))
clean: $(patsubst %, _cleandir_%, $(SUBDIRS))
	-rm -f core *~
$(patsubst %, _cleandir_%, $(SUBDIRS)):
	$(MAKE) -C $(patsubst _cleandir_%, %, $@) clean

.PHONY = reallyclean $(patsubst %, _reallycleandir_%, $(SUBDIRS))
reallyclean: clean $(patsubst %, _reallycleandir_%, $(SUBDIRS))
$(patsubst %, _reallycleandir_%, $(SUBDIRS)):
	$(MAKE) -C $(patsubst _reallycleandir_%, %, $@) reallyclean