diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-06-19 18:46:33 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-06-19 18:46:33 +0000 |
commit | 10f7c398da70900c30acca6b30f9158000360947 (patch) | |
tree | a10b1f2d0ce6f9e615213e3f50a5b05391509384 /gcc/melt-module.mk | |
parent | 54848ed42432fa676d5e87fa37a4c2696b8c80fe (diff) | |
download | gcc-10f7c398da70900c30acca6b30f9158000360947.tar.gz |
2012-06-19 Basile Starynkevitch <basile@starynkevitch.net>
* melt-module.mk: Add rules for various *.meltmod.so and make a
symlink if MELTGEN_MODULENAME defined.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@188790 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/melt-module.mk')
-rw-r--r-- | gcc/melt-module.mk | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/gcc/melt-module.mk b/gcc/melt-module.mk index 17234498924..53070f3219c 100644 --- a/gcc/melt-module.mk +++ b/gcc/melt-module.mk @@ -164,6 +164,8 @@ GCCMELT_SECONDARY_MDSUMED_BASES := $(join $(basename $(notdir $(GCCMELT_SECONDAR GCCMELTGEN_BUILD=$(GCCMELT_MODULE_WORKSPACE)/ -include $(GCCMELT_MODULE_SOURCEBASE)+meltbuild.mk + +## rules for meltpic.o object files $(GCCMELTGEN_BUILD)%.quicklybuilt.meltpic.o: @echo quicklybuilt.meltpic at= $@ inf= $< question= $? caret= $^ $(GCCMELT_CC) -DMELTGCC_MODULE_QUICKLYBUILT -DMELT_HAVE_DEBUG=1 \ @@ -194,6 +196,32 @@ $(GCCMELTGEN_BUILD)%.descr.meltpic.o: $(GCCMELT_DESCRIPTOR_FLAGS) $(GCCMELT_CFLAGS) \ -fPIC -c -o $@ $< + +## rules for meltmod.so shared objects +$(GCCMELTGEN_BUILD)%.quicklybuilt.meltmod.so: + @echo quicklybuilt.meltmod at= $@ inf= $< question= $? caret= $^ + $(GCCMELT_CC) -o $@ \ + $(GCCMELT_QUICKLYBUILT_FLAGS) $(GCCMELT_CFLAGS) \ + -shared $^ + +$(GCCMELTGEN_BUILD)%.optimized.meltmod.so: + @echo optimized.meltmod at= $@ inf= $< question= $? caret= $^ + $(GCCMELT_CC) -o $@ \ + $(GCCMELT_OPTIMIZED_FLAGS) $(GCCMELT_CFLAGS) \ + -shared $^ + +$(GCCMELTGEN_BUILD)%.debugnoline.meltmod.so: + @echo debugnoline.meltmod at= $@ inf= $< question= $? caret= $^ + $(GCCMELT_CC) -o $@ \ + $(GCCMELT_DEBUGNOLINE_FLAGS) $(GCCMELT_CFLAGS) \ + -shared $^ + +$(GCCMELTGEN_BUILD)%.dynamic.meltmod.so: + @echo dynamic.meltmod at= $@ inf= $< question= $? caret= $^ + $(GCCMELT_CC) -o $@ \ + $(GCCMELT_DYNAMIC_FLAGS) $(GCCMELT_CFLAGS) \ + -shared $^ + ################################################################ vpath %.optimized.pic.o $(GCCMELT_MODULE_WORKSPACE) $(GCCMELT_MODULE_WORKSPACE)/%.optimized.pic.o: @@ -292,11 +320,22 @@ $(GCCMELT_MODULE_WORKSPACE)/$(GCCMELT_BASE).$(GCCMELT_CUMULATED_MD5).debugnoline $(GCCMELT_CC) $(GCCMELT_DEBUGNOLINE_FLAGS) $(GCCMELT_CFLAGS) -fPIC $(SHARED_LIBRARY_FLAGS) -o $@ $^ $(GCCMELT_MODULE_EXTRALIBES) -$(GCCMELT_MODULE_BINARYBASE).$(GCCMELT_MODULE_FLAVOR).so: $(GCCMELT_MODULE_WORKSPACE)/$(GCCMELT_BASE).$(GCCMELT_CUMULATED_MD5).$(GCCMELT_MODULE_FLAVOR).so - echo @+@melt-module inf= $< at= $@ + +################################################################ +ifdef MELTGEN_MODULENAME +$(GCCMELT_MODULE_BINARYBASE).$(GCCMELT_MODULE_FLAVOR).so: \ + $(GCCMELTGEN_BUILD)$(notdir $(MELTGEN_MODULENAME)).$(GCCMELT_CUMULATED_MD5).$(GCCMELT_MODULE_FLAVOR).meltmod.so + @echo @-@melt-module with MELTGEN_MODULENAME= $(MELTGEN_MODULENAME) inf= $< at= $@ +## the melt-runtime.c requires the link with the cumulated md5 + $(LN_S) -v -f $(realpath $<) $(GCCMELT_MODULE_WORKSPACE)/$(GCCMELT_BASE).$(GCCMELT_CUMULATED_MD5).$(GCCMELT_MODULE_FLAVOR).so $(LN_S) -v -f $(realpath $<) $@ +else +$(GCCMELT_MODULE_BINARYBASE).$(GCCMELT_MODULE_FLAVOR).so: $(GCCMELT_MODULE_WORKSPACE)/$(GCCMELT_BASE).$(GCCMELT_CUMULATED_MD5).$(GCCMELT_MODULE_FLAVOR).so + echo @+@melt-module inf= without MELTGEN_MODULENAME $< at= $@ + $(LN_S) -v -f $(realpath $<) $@ +endif melt_module: melt_workspace $(GCCMELT_MODULE_BINARYBASE).$(GCCMELT_MODULE_FLAVOR).so |