Makefile 640 Bytes
Newer Older
Brian Paul's avatar
Brian Paul committed
1 2 3 4 5 6 7 8 9
# src/Makefile

TOP = ..

include $(TOP)/configs/current

SUBDIRS = $(SRC_DIRS)


10
default: message $(TOP)/$(LIB_DIR) subdirs
11 12 13 14


message:
	@echo "Making sources for" $(CONFIG_NAME)
Brian Paul's avatar
Brian Paul committed
15 16 17 18 19


subdirs:
	@for dir in $(SUBDIRS) ; do \
		if [ -d $$dir ] ; then \
20
			(cd $$dir && $(MAKE)) || exit 1; \
Brian Paul's avatar
Brian Paul committed
21 22 23
		fi \
	done

24
install: $(TOP)/$(LIB_DIR)
25 26
	@for dir in $(SUBDIRS) ; do \
		if [ -d $$dir ] ; then \
27
			(cd $$dir && $(MAKE) install) || exit 1 ; \
28 29
		fi \
	done
Brian Paul's avatar
Brian Paul committed
30

31
$(TOP)/$(LIB_DIR):
32
	-@test -d $(TOP)/$(LIB_DIR) || mkdir -p $(TOP)/$(LIB_DIR)
Brian Paul's avatar
Brian Paul committed
33 34 35


clean:
Dan Nicholson's avatar
Dan Nicholson committed
36
	-@for dir in $(SUBDIRS) ; do \
Brian Paul's avatar
Brian Paul committed
37
		if [ -d $$dir ] ; then \
38
			(cd $$dir && $(MAKE) clean) ; \
Brian Paul's avatar
Brian Paul committed
39 40
		fi \
	done