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