File: makefile

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 (55 lines) | stat: -rw-r--r-- 1,234 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Test Framework GNUC makefile

CXX = g++
CXXFLAGS += -ggdb -I../../../../angelscript/include -Wno-missing-field-initializers
SRCDIR = ../../source
OBJDIR = obj

ifdef DONT_WAIT
    CXXFLAGS += -DDONT_WAIT
endif


SRCNAMES = \
  main.cpp \
  gamemgr.cpp \
  gameobj.cpp \
  scriptmgr.cpp \


OBJ = $(addprefix $(OBJDIR)/, $(notdir $(SRCNAMES:.cpp=.o))) \
  obj/scripthandle.o \
  obj/scriptstdstring.o \
  obj/scriptbuilder.o \
  obj/weakref.o \
  

BIN = ../../bin/game
DELETER = rm -f

all: $(BIN)

$(BIN): $(OBJ)
	$(CXX) $(LDFLAGS) -o $(BIN) $(OBJ) -static -langelscript -dynamic -lpthread -L../../../../angelscript/lib
	@echo -------------------------------------------------------------------
	@echo Done.

$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
	$(CXX) $(CXXFLAGS) -o $@ -c $<

obj/scripthandle.o: ../../../../add_on/scripthandle/scripthandle.cpp
	$(CXX) $(CXXFLAGS) -o $@ -c $<
	
obj/scriptstdstring.o: ../../../../add_on/scriptstdstring/scriptstdstring.cpp
	$(CXX) $(CXXFLAGS) -o $@ -c $<

obj/scriptbuilder.o: ../../../../add_on/scriptbuilder/scriptbuilder.cpp
	$(CXX) $(CXXFLAGS) -o $@ -c $<

obj/weakref.o: ../../../../add_on/weakref/weakref.cpp
	$(CXX) $(CXXFLAGS) -o $@ -c $<

clean:
	$(DELETER) $(OBJ) $(BIN)

.PHONY: all clean