# You can do "make SUB=blah" to make only a few, or edit here, or both
# You can also run make directly in the subdirs you want.

SUB =   rpc.bootparamd

%.build:
	(cd $(patsubst %.build, %, $@) && $(MAKE))

%.install:
	(cd $(patsubst %.install, %, $@) && $(MAKE) install)

%.clean:
	(cd $(patsubst %.clean, %, $@) && $(MAKE) clean)

all:     $(patsubst %, %.build, $(SUB))
install: $(patsubst %, %.install, $(SUB))
clean:   $(patsubst %, %.clean, $(SUB))

distclean: clean
	rm -f MCONFIG

MCONFIG: MCONFIG.in configure Makefile
	CROSS_COMP=yes \
	STRIP="/opt/hardhat/devkit/ppc/8xx/bin/ppc_8xx-strip --remove-section=.note --remove-section=.comment" \
	./configure --installroot=$(TARGET_DIR) --prefix= \
				--with-c-compiler=/opt/hardhat/devkit/ppc/8xx/bin/ppc_8xx-gcc

