-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
36 lines (29 loc) · 999 Bytes
/
Makefile
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
.PHONY: all update_upstream ext_skel ext_compile ext_install clean cleanall
all:
@echo "Makefile options:"
@echo "1) make update_upstream : initial/update cphalcon kernel"
@echo "2) make ext_skel extname=EXTENSION_NAME : create skeleton extension"
@echo "3) make ext_compile extname=EXTENSION_NAME : create skeleton extension"
@echo "4) make ext_install extname=EXTENSION_NAME : create skeleton extension"
update_upstream:
@cd scripts && ./update_upstream
ext_skel:
@cd scripts && ./ext_skel "$(extname)"
ext_compile:
ifdef extname
@cd ext/$(extname) && phpize && ./configure --enable-$(extname) && CFLAGS="-O2 -fno-delete-null-pointer-checks" make
else
@echo "Please assign extname variable,"
@echo "$ make ext_compile extname=EXTENSION_NAME"
endif
ext_install: ext_compile
ifdef extname
@cd ext/$(extname) && make install
else
@echo "Please assign extname variable,"
@echo "$ make ext_compile extname=EXTENSION_NAME"
endif
clean:
@rm -rf build
distclean: clean
@rm -rf ext/*