Makefile 530 Bytes
Newer Older
1 2 3 4
# Runs 'make', 'make install', and 'make clean' in specified subdirectories
SUBDIRS := src
INSTALLDIRS = $(SUBDIRS:%=install-%)
CLEANDIRS =   $(SUBDIRS:%=clean-%)
5

6
#TARGETDIR=$(DESTDIR)/www/pages
7

8 9
all: $(SUBDIRS)
	@echo "make all top"
10

11 12
$(SUBDIRS):
	$(MAKE) -C $@
13

14 15
install: $(INSTALLDIRS)
	@echo "make install top"
16

17 18
$(INSTALLDIRS): 
	$(MAKE) -C $(@:install-%=%) install
19

20 21
clean: $(CLEANDIRS)
	@echo "make clean top"
22

23 24
$(CLEANDIRS): 
	$(MAKE) -C $(@:clean-%=%) clean
Andrey Filippov's avatar
Andrey Filippov committed
25

26
.PHONY: all install clean $(SUBDIRS) $(INSTALLDIRS) $(CLEANDIRS)
Andrey Filippov's avatar
Andrey Filippov committed
27