69 # 70 # Note: The blog says to use "-W0,-xglobalstatic", but that doesn't 71 # seem to work. I got "-W0,-noglobal" from Kelly and that works. 72 #LAUNCHERFLAGS += -W0,-noglobal 73 endif # Platform_compiler == sparcWorks 74 75 LAUNCHER_OUT = launcher 76 77 SUFFIXES += .d 78 79 SOURCES := $(shell find $(LAUNCHERDIR) -name "*.c") 80 SOURCES_SHARE := $(shell find $(LAUNCHERDIR_SHARE) -name "*.c") 81 82 OBJS := $(patsubst $(LAUNCHERDIR)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES)) $(patsubst $(LAUNCHERDIR_SHARE)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES_SHARE)) 83 84 DEPFILES := $(patsubst %.o,%.d,$(OBJS)) 85 -include $(DEPFILES) 86 87 $(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR_SHARE)/%.c 88 $(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); } 89 $(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CPPFLAGS) 90 91 $(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR)/%.c 92 $(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); } 93 $(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CPPFLAGS) 94 95 $(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE) 96 ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),) 97 $(QUIETLY) echo Linking launcher... 98 $(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK) 99 $(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(OBJS) $(LIBS_LAUNCHER) 100 $(QUIETLY) $(LINK_LAUNCHER/POST_HOOK) 101 endif # filter -sbfast -xsbfast 102 103 $(LAUNCHER): $(LAUNCHER_SCRIPT) 104 105 $(LAUNCHER_SCRIPT): $(LAUNCHERDIR)/launcher.script 106 $(QUIETLY) sed -e 's/@@LIBARCH@@/$(LIBARCH)/g' $< > $@ 107 $(QUIETLY) chmod +x $@ 108 | 69 # 70 # Note: The blog says to use "-W0,-xglobalstatic", but that doesn't 71 # seem to work. I got "-W0,-noglobal" from Kelly and that works. 72 #LAUNCHERFLAGS += -W0,-noglobal 73 endif # Platform_compiler == sparcWorks 74 75 LAUNCHER_OUT = launcher 76 77 SUFFIXES += .d 78 79 SOURCES := $(shell find $(LAUNCHERDIR) -name "*.c") 80 SOURCES_SHARE := $(shell find $(LAUNCHERDIR_SHARE) -name "*.c") 81 82 OBJS := $(patsubst $(LAUNCHERDIR)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES)) $(patsubst $(LAUNCHERDIR_SHARE)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES_SHARE)) 83 84 DEPFILES := $(patsubst %.o,%.d,$(OBJS)) 85 -include $(DEPFILES) 86 87 $(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR_SHARE)/%.c 88 $(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); } 89 $(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CXXFLAGS) 90 91 $(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR)/%.c 92 $(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); } 93 $(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CXXFLAGS) 94 95 $(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE) 96 ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),) 97 $(QUIETLY) echo Linking launcher... 98 $(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK) 99 $(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(OBJS) $(LIBS_LAUNCHER) 100 $(QUIETLY) $(LINK_LAUNCHER/POST_HOOK) 101 endif # filter -sbfast -xsbfast 102 103 $(LAUNCHER): $(LAUNCHER_SCRIPT) 104 105 $(LAUNCHER_SCRIPT): $(LAUNCHERDIR)/launcher.script 106 $(QUIETLY) sed -e 's/@@LIBARCH@@/$(LIBARCH)/g' $< > $@ 107 $(QUIETLY) chmod +x $@ 108 |