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
45 # Make the GC shared object
46 $B/cdgc.so: $(patsubst %.d,$B/%.o,$(sources))
49 # General pattern rules
50 #######################
52 $B/%.so: DCFLAGS += $(DC_SO_OPT)
55 $(if $V,,@echo ' $(LD) $@')
56 $(if $V,,@) $(LD) $(LDFLAGS) $(LD_SO_OPT) $(LD_OUTPUT_OPTION) $^
59 $(if $V,,@echo ' $(DC) $@')
60 $(if $V,,@) $(DC) $(DCFLAGS) $(DC_OBJ_OPT) $(DC_OUTPUT_OPTION) $<
63 $(if $V,,@echo ' $(RM) $B')
64 $(if $V,,@) $(RM) -r $B
66 __dummy := $(shell mkdir -p $B)