File: Makefile.samples

package info (click to toggle)
angelscript 2.38.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,736 kB
  • sloc: cpp: 77,114; asm: 2,017; makefile: 666; xml: 253; javascript: 42; ansic: 26; python: 22; sh: 7
file content (32 lines) | stat: -rw-r--r-- 649 bytes parent folder | download | duplicates (3)
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
PROJECT = angelscript-samples

CPPFLAGS += -D_LINUX_ -DAS_DEBIAN_LIB
CXXFLAGS +=
LDFLAGS += -langelscript-addon -langelscript

.PHONY: test

define run_sample
test: test_$(1)

.PHONY: test_$(1)
test_$(1): $(1)/bin/$(1)
	cd $(1)/bin && echo y | ./$(1)

$(1)/bin:
	mkdir -p $$@

$(1)/bin/$(1): $(1)/source/main.cpp $(2)
	mkdir -p $(1)/bin
	$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) -o $$@ $$^ $$(LDFLAGS)

clean: clean_$(1)
clean_$(1):
	rm -rf $(1)/bin/$(1)
endef

$(eval $(call run_sample,tutorial))
$(eval $(call run_sample,include))
#$(eval $(call run_sample,game, game/source/gamemgr.cpp game/source/gameobj.cpp game/source/scriptmgr.cpp))

.PHONY: clean