PageRenderTime 246ms CodeModel.GetById 243ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/top.make

http://github.com/digego/extempore
Unknown | 51 lines | 38 code | 13 blank | 0 comment | 0 complexity | b8360025a281e7b1b231010c0153b098 MD5 | raw file
 1OBJDIR := build/obj
 2
 3PERL := perl
 4
 5include config/$(EXTEMPORE_OS).make
 6include src/component.make
 7
 8DEFINES := $(PLATFORM_DEFINES) \
 9	-D_GNU_SOURCE \
10	-D__STDC_CONSTANT_MACROS \
11	-D__STDC_LIMIT_MACROS \
12
13LLVM_CXXFLAGS := $(EXT_LLVM_CXXFLAGS)
14LLVM_LDFLAGS := $(EXT_LLVM_LDFLAGS)
15LLVM_LIBS := $(EXT_LLVM_LIBS)
16
17LIBS := \
18	$(PLATFORM_LIBS) \
19	$(LLVM_LIBS) \
20
21CXX := $(PLATFORM_CXX)
22LD := $(PLATFORM_LD)
23
24CXXFLAGS := \
25	-w -O3 -MMD \
26	$(LLVM_CXXFLAGS) \
27	$(PLATFORM_CXXFLAGS) \
28	$(DEFINES) \
29	$(EXT_USER_ARGS) \
30	-Iinclude \
31        -fexceptions \
32        -frtti \
33
34LDFLAGS := \
35	$(EXT_LLVM_LDFLAGS) \
36	$(PLATFORM_LDFLAGS) \
37
38extempore: $(OBJFILES)
39	@echo + ld $(LDFLAGS) -o $@ $(OBJFILES) $(LIBS)
40	@$(LD) $(LDFLAGS) -o $@ $(OBJFILES) $(LIBS)
41
42# C++ include-dependencies are tracked for us by the compiler.  In the
43# following, we gather all the dependency information into one file and
44# include it.
45
46$(OBJDIR)/.deps: $(wildcard $(OBJDIR)/*.d)
47	@mkdir -p $(@D)
48	@$(PERL) build/mergedep.pl $@ $^
49
50
51-include $(OBJDIR)/.deps