forked from digego/extempore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
top.make
53 lines (40 loc) · 1.01 KB
/
top.make
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
OBJDIR := build/obj
PERL := perl
include config/$(EXTEMPORE_OS).make
include src/component.make
DEFINES := $(PLATFORM_DEFINES) \
-D_GNU_SOURCE \
-D__STDC_CONSTANT_MACROS \
-D__STDC_LIMIT_MACROS \
LLVM_CXXFLAGS := $(EXT_LLVM_CXXFLAGS)
LLVM_LDFLAGS := $(EXT_LLVM_LDFLAGS)
LLVM_LIBS := $(EXT_LLVM_LIBS)
LIBS := \
$(PLATFORM_LIBS) \
$(LLVM_LIBS) \
CXX := $(PLATFORM_CXX)
LD := $(PLATFORM_LD)
CXXFLAGS := \
-w -O3 -MMD \
$(CPPFLAGS) \
$(LLVM_CXXFLAGS) \
$(PLATFORM_CXXFLAGS) \
$(DEFINES) \
$(EXT_USER_ARGS) \
-Iinclude \
-fexceptions \
-frtti \
LDFLAGS := \
$(LDFLAGS) \
$(EXT_LLVM_LDFLAGS) \
$(PLATFORM_LDFLAGS) \
extempore: $(OBJFILES)
@echo + ld $(LDFLAGS) -o $@ $(OBJFILES) $(LIBS)
@$(LD) $(LDFLAGS) -o $@ $(OBJFILES) $(LIBS)
# C++ include-dependencies are tracked for us by the compiler. In the
# following, we gather all the dependency information into one file and
# include it.
$(OBJDIR)/.deps: $(wildcard $(OBJDIR)/*.d)
@mkdir -p $(@D)
@$(PERL) build/mergedep.pl $@ $^
-include $(OBJDIR)/.deps