1# This file is include in the sub-projects's Makefiles to inherit standard
2# build behavior.  The sub-project's Makefiles need to define NAME and
3# VERSION.  The custompatching target may by redefined to do any patching
4# just after files are unpacked from the tarball.  The postinstall target
5# may be redefined to do any post install processing.
6
7NAMEVERSION := $(NAME)-$(VERSION)
8TARBALL := $(NAMEVERSION).tar.gz
9DIR := $(OBJROOT)/$(NAME)/$(NAMEVERSION)
10
11$(DIR):
12	mkdir -p $(OBJROOT)/$(NAME)
13	gnutar xozf $(TARBALL) -C $(OBJROOT)/$(NAME)
14
15afterinstallsrc::
16	@echo "# $(NAME): afterinstallsrc"
17
18install: realinstall postinstall
19
20realinstall: $(DIR) custompatching
21	cd $(DIR) && \
22	ARCHFLAGS="$(RC_CFLAGS)" \
23	python setup.py install --home="$(EXTRAS)" --root="$(DSTROOT)" $(SETUPARGS)
24
25# allow custom patching before running setup.py
26custompatching:
27
28# allow post install customization
29postinstall:
30
31# whether to avoid 64-bit compiles
32no64:
33ifeq ($(NO64),YES)
34	@echo YES
35else
36	@echo NO
37endif
38