mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
Programs will be, by default, linke with "-Wl,--as-needed" to
reduce unused library dependencies.
This commit is contained in:
parent
ef7c53d33d
commit
3f821eb1e5
7
Jamrules
7
Jamrules
@ -29,14 +29,17 @@ EDEDESKTOPDIR ?= "$(PREFIX)/data/desktop" ;
|
||||
GLOBALFLAGS ?= -Wall -pedantic -g3 -D_DEBUG -I$(TOP) ;
|
||||
STDLIB ?= -lstdc++ ;
|
||||
|
||||
# some options
|
||||
REMOVE_UNUSED_DEPENDENCIES_TRICK = 1 ;
|
||||
|
||||
# edelib libraries path
|
||||
EDELIBINCLUDE ?= -I/opt/ede/include ;
|
||||
EDELIBLIB ?= -L/opt/ede/lib -ledelib ;
|
||||
|
||||
# fltk libraries path
|
||||
FLTKINCLUDE ?= -I/usr/local/include ;
|
||||
FLTKLIB ?= -L/usr/local/lib -lfltk_images -lpng -lz -ljpeg -lfltk -ldl -lm -lXext -lX11 -lXpm ;
|
||||
FLTKLIB_NOIMAGES ?= -L/usr/local/lib -lfltk -ldl -lm -lXext -lX11 ;
|
||||
FLTKLIB ?= -L/usr/local/lib -lfltk_images -lpng -lz -ljpeg -lfltk -ldl -lm -lXext -lXft -lX11 -lXpm ;
|
||||
FLTKLIB_NOIMAGES ?= -L/usr/local/lib -lfltk -ldl -lm -lXext -lXft -lX11 ;
|
||||
|
||||
# backward; efltk libraries path
|
||||
EFLTKINCLUDE ?= -I/usr/local/include ;
|
||||
|
@ -32,6 +32,11 @@ rule MakeProgramPrivate
|
||||
CFLAGS on $(objects) += $(4) ;
|
||||
C++FLAGS on $(objects) += $(4) ;
|
||||
|
||||
if $(REMOVE_UNUSED_DEPENDENCIES_TRICK) = 1 {
|
||||
# remove unused dependencies in binaries, as U.Drepper prescribed ;-)
|
||||
LINKFLAGS on $(target) = -Wl,--as-needed [ on $(target) return $(LINKFLAGS) ] ;
|
||||
}
|
||||
|
||||
LINKLIBS on $(target) = $(3) [ on $(target) return $(LINKLIBS) ] ;
|
||||
|
||||
MainFromObjects $(target) : $(objects) ;
|
||||
|
Loading…
Reference in New Issue
Block a user