8 # DC compilation options to produce unlinked objects
11 # DC compilation options to produce PIC objects
12 DC_SO_OPT := -relocation-model=pic
14 # DC option to tell where to store the output
15 DC_OUTPUT_OPTION = -of=$@
17 # Extra flags for the compiler
18 DCFLAGS := -O5 -release
24 # Link options to produce a shared library
25 LD_SO_OPT = -fPIC -shared -Wl,-soname,$@
27 # DC option to tell where to store the output
28 LD_OUTPUT_OPTION = -o $@
30 # Extra flags for the linker
34 sources := $(addprefix rt/gc/cdgc/,\
46 # Make the GC shared object
47 $B/cdgc.so: $(patsubst %.d,$B/%.o,$(sources))
50 # General pattern rules
51 #######################
53 $B/%.so: DCFLAGS += $(DC_SO_OPT)
56 $(if $V,,@echo ' $(LD) $@')
57 $(if $V,,@) $(LD) $(LDFLAGS) $(LD_SO_OPT) $(LD_OUTPUT_OPTION) $^
60 $(if $V,,@echo ' $(DC) $@')
61 $(if $V,,@) $(DC) $(DCFLAGS) $(DC_OBJ_OPT) $(DC_OUTPUT_OPTION) $<
64 $(if $V,,@echo ' $(RM) $B')
65 $(if $V,,@) $(RM) -r $B
67 __dummy := $(shell mkdir -p $B)