1#
2# Copyright (c) 2013 No Face Press, LLC
3# License http://opensource.org/licenses/mit-license.php MIT License
4#
5
6#This makefile is used to test the other Makefiles
7
8TOP = ..
9TEST_OUT = test_install
10
11include $(TOP)/resources/Makefile.in-os
12
13all: test
14
15test: buildoptions buildlibs buildinstall
16test: buildexamples threaded
17
18ifeq ($(TARGET_OS),OSX)
19test: dmg
20endif
21
22test: clean
23	@echo PASSED
24
25dmg:
26	@echo "================"
27	$(MAKE) -C $(TOP) -f Makefile.osx clean package
28
29buildexamples:
30	@echo "================"
31	$(MAKE) -C $(TOP)/examples/embedded_c clean all
32	$(MAKE) -C $(TOP)/examples/embedded_c clean
33	@echo "================"
34	$(MAKE) -C $(TOP)/examples/embedded_cpp clean all
35	$(MAKE) -C $(TOP)/examples/embedded_cpp clean
36	@echo "================"
37	$(MAKE) -C $(TOP)/examples/chat clean all
38	$(MAKE) -C $(TOP)/examples/chat clean
39	@echo "================"
40	$(MAKE) -C $(TOP)/examples/hello clean all
41	$(MAKE) -C $(TOP)/examples/hello clean
42	@echo "================"
43	$(MAKE) -C $(TOP)/examples/post clean all
44	$(MAKE) -C $(TOP)/examples/post clean
45	@echo "================"
46	$(MAKE) -C $(TOP)/examples/upload clean all
47	$(MAKE) -C $(TOP)/examples/upload clean
48	@echo "================"
49	$(MAKE) -C $(TOP)/examples/websocket clean all
50	$(MAKE) -C $(TOP)/examples/websocket clean
51
52buildoptions:
53	@echo "================"
54	$(MAKE) -C $(TOP) clean build
55	@echo "================"
56	$(MAKE) -C $(TOP) clean build WITH_IPV6=1
57	@echo "================"
58	$(MAKE) -C $(TOP) clean build WITH_WEBSOCKET=1
59	@echo "================"
60	$(MAKE) -C $(TOP) clean build WITH_LUA=1
61	@echo "================"
62	$(MAKE) -C $(TOP) clean build WITH_LUA=1 WITH_IPV6=1 WITH_WEBSOCKET=1
63
64threaded:
65	@echo "================"
66	$(MAKE) -j 8 -C $(TOP) clean WITH_LUA=1
67	$(MAKE) -j 8 -C $(TOP) build WITH_LUA=1
68
69buildinstall:
70	@echo "================"
71	$(MAKE) -C $(TOP) clean install PREFIX=$(TEST_OUT)
72
73buildlibs:
74	@echo "================"
75	$(MAKE) -C $(TOP) clean lib
76	@echo "================"
77	$(MAKE) -C $(TOP) clean slib
78	@echo "================"
79	$(MAKE) -C $(TOP) clean lib WITH_CPP=1
80	@echo "================"
81	$(MAKE) -C $(TOP) clean slib WITH_CPP=1
82
83clean:
84	@echo "================"
85	$(MAKE) -C $(TOP) clean
86	rm -rf $(TOP)/$(TEST_OUT)
87
88.PHONY: all buildoptions buildinstall clean os linux
89