Added -fPIC flag for start-menu applet code, that prevented linkage.

Common menu code will be compiled now once in separate library.
This commit is contained in:
Sanel Zukan 2009-10-15 14:51:15 +00:00
parent 5de582c27b
commit 75aca1e984
2 changed files with 6 additions and 7 deletions

View File

@ -31,9 +31,8 @@ rule PanelApplet
Main $(target) : $(>) ; Main $(target) : $(>) ;
ObjectC++Flags $(>) : -fPIC $(FLTKINCLUDE) -I [ FDirName $(TOP) ede-panel ] $(EDELIBINCLUDE) ; ObjectC++Flags $(>) : -fPIC $(FLTKINCLUDE) -I [ FDirName $(TOP) ede-panel ] $(EDELIBINCLUDE) ;
LinkAgainst $(target) : $(NETWMLIB) $(EDELIBLIB) $(EDELIB_GUI_LIB) $(FLTKLIB) $(STDLIB) ; LinkAgainst $(target) : $(NETWMLIB) $(3) $(EDELIBLIB) $(EDELIB_GUI_LIB) $(FLTKLIB) $(STDLIB) ;
LINKFLAGS on $(target) = -shared -rdynamic [ on $(target) return $(LINKFLAGS) ] ; LINKFLAGS on $(target) = -shared -rdynamic [ on $(target) return $(LINKFLAGS) ] ;
LINKLIBS on $(target) = [ on $(target) return $(LINKLIBS) ] $(3) ;
InstallProgram $(EDE_PANEL_APPLETS_DIR) : $(target) ; InstallProgram $(EDE_PANEL_APPLETS_DIR) : $(target) ;

View File

@ -12,10 +12,10 @@ SubDir TOP ede-panel applets start-menu ;
MENU_SRC = XdgMenuReader.cpp DesktopEntry.cpp MenuRules.cpp ; MENU_SRC = XdgMenuReader.cpp DesktopEntry.cpp MenuRules.cpp ;
# TODO: MENU_SRC files will be compiled twice, once for applet and once for test program. Library libmenu : $(MENU_SRC) ;
ObjectC++Flags $(MENU_SRC) : -fPIC $(FLTKINCLUDE) -I [ FDirName $(TOP) ede-panel ] $(EDELIBINCLUDE) ;
# applet PanelApplet start_menu : StartMenu.cpp : -L$(SUBDIR) -lmenu ;
PanelApplet start_menu : StartMenu.cpp $(MENU_SRC) ;
# test program EdeProgram ede-menu-spec-test : ede-menu-spec-test.cpp ;
EdeProgram ede-menu-spec-test : ede-menu-spec-test.cpp $(MENU_SRC) ; LinkAgainstAsFirst ede-menu-spec-test : -L$(SUBDIR) -lmenu ;