2007-03-16 16:06:41 +03:00
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
# Part of Equinox Desktop Environment (EDE).
|
|
|
|
# Copyright (c) 2000-2007 EDE Authors.
|
|
|
|
#
|
|
|
|
# This program is licenced under terms of the
|
|
|
|
# GNU General Public Licence version 2 or newer.
|
|
|
|
# See COPYING for details.
|
|
|
|
|
|
|
|
XGETTEXT ?= xgettext ;
|
|
|
|
MSGFMT ?= msgfmt ;
|
2007-03-15 19:21:30 +03:00
|
|
|
|
2007-03-16 18:18:54 +03:00
|
|
|
FLAGS ?= -Wall -g3 -D_DEBUG -I$(TOP) ;
|
2007-03-15 19:21:30 +03:00
|
|
|
STDLIB ?= -lstdc++ ;
|
|
|
|
|
|
|
|
FLTKLIB ?= -L/usr/local/lib -lfltk2 ;
|
|
|
|
FLTKIMAGES ?= -L/usr/local/lib -lfltk2_images ;
|
2007-03-16 18:18:54 +03:00
|
|
|
|
|
|
|
# backward
|
|
|
|
EFLTKLIB ?= -L/usr/local/lib -lefltk ;
|
|
|
|
EFLTKIMAGES ?= -L/usr/local/lib -lefltk_images ;
|
|
|
|
|
2007-03-15 19:21:30 +03:00
|
|
|
X11LIBS ?= -L/usr/X11R6/lib -lX11 -lXi -lXinerama -lXft -lpthread -lm -lXext ;
|
|
|
|
IMGLIBS ?= -lpng -ljpeg -lz ;
|
|
|
|
|
2007-03-16 16:06:41 +03:00
|
|
|
EDELIB_NAME = libedelib ;
|
|
|
|
EDELIB = -ledelib ;
|
2007-03-15 19:21:30 +03:00
|
|
|
EDELIBDIR = edelib2 ;
|
|
|
|
|
|
|
|
# this is used by jam
|
2007-03-16 16:06:41 +03:00
|
|
|
CCFLAGS = $(FLAGS) ;
|
|
|
|
C++FLAGS = $(FLAGS) ;
|
2007-03-15 19:21:30 +03:00
|
|
|
OPTIM = ;
|
|
|
|
|
2007-03-16 16:06:41 +03:00
|
|
|
# at least we differ for FDirName
|
|
|
|
rule FFileName
|
|
|
|
{
|
|
|
|
return [ FDirName $(<) ] ;
|
|
|
|
}
|
|
|
|
|
2007-03-15 19:21:30 +03:00
|
|
|
rule MakeLibrary
|
|
|
|
{
|
|
|
|
Library $(<) : $(>) ;
|
|
|
|
}
|
|
|
|
|
2007-03-16 18:18:54 +03:00
|
|
|
# internal used by MakeProgram and MakeEfltkProgram
|
|
|
|
rule InternalMakeProgram
|
2007-03-15 19:21:30 +03:00
|
|
|
{
|
|
|
|
local eldir ;
|
2007-03-16 16:06:41 +03:00
|
|
|
local target ;
|
|
|
|
|
2007-03-15 19:21:30 +03:00
|
|
|
eldir = [ FDirName $(TOP) $(EDELIBDIR) ] ;
|
2007-03-16 16:06:41 +03:00
|
|
|
|
|
|
|
# this will make happy original jam and ftjam
|
|
|
|
# since constructing it's grist from source file
|
|
|
|
# it will make it unique and prevent colision same directory name
|
|
|
|
target = $(1:G=$(SOURCE_GRIST)) ;
|
|
|
|
|
|
|
|
# check if we got additional flags
|
|
|
|
if $(3)
|
|
|
|
{
|
|
|
|
SUBDIRC++FLAGS += $(3) ;
|
|
|
|
SUBDIRCCFLAGS += $(3) ;
|
|
|
|
}
|
|
|
|
|
2007-03-16 18:18:54 +03:00
|
|
|
LINKLIBS on $(target) = -L$(eldir) $(EDELIB) $(4) $(IMGLIBS) $(5) $(X11LIBS) $(6) $(STDLIB) ;
|
2007-03-16 16:06:41 +03:00
|
|
|
Main $(target) : $(2) ;
|
|
|
|
}
|
|
|
|
|
2007-03-16 18:18:54 +03:00
|
|
|
# This should be used to build ede2 apps.
|
|
|
|
# MakeProgram <target> : <sources> : <optional-flags> : <optional-libs> ;
|
|
|
|
rule MakeProgram
|
|
|
|
{
|
|
|
|
InternalMakeProgram $(1) : $(2) : $(3) : $(FLTKIMAGES) : $(FLTKLIB) : $(4) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
# This is for efltk (aka. previous code) compilation
|
|
|
|
# so it can be tested with whole package.
|
|
|
|
# It should be used only until efltk programs are translited
|
|
|
|
# to fltk.
|
|
|
|
# MakeEfltkProgram <target> : <sources> : <optional-flags> ;
|
|
|
|
rule MakeEfltkProgram
|
|
|
|
{
|
|
|
|
InternalMakeProgram $(1) : $(2) : $(3) : $(EFLTKIMAGES) : $(EFLTKLIB) ;
|
|
|
|
}
|
|
|
|
|
2007-03-16 16:06:41 +03:00
|
|
|
# ExtractStrings <dir-where> : <source> ;
|
|
|
|
rule ExtractStrings
|
|
|
|
{
|
|
|
|
local strfile = "messages.pot" ;
|
|
|
|
local path = $(SEARCH_SOURCE) ;
|
|
|
|
local locale_dir = [ FDirName $(path) $(<) ] ;
|
|
|
|
local target = [ FFileName $(locale_dir) $(strfile) ] ;
|
|
|
|
local source = $(>:R=$(path)) ;
|
|
|
|
|
|
|
|
if $(XGETTEXT)
|
|
|
|
{
|
|
|
|
MkDir $(locale_dir) ;
|
|
|
|
for i in $(source)
|
|
|
|
{
|
|
|
|
Depends $(target) : $(i) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
XGettext $(target) : $(source) ;
|
|
|
|
Depends $(target) : $(locale_dir) ;
|
|
|
|
Depends all : $(target) ;
|
|
|
|
Clean clean : $(target) ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
actions XGettext
|
|
|
|
{
|
|
|
|
$(XGETTEXT) -k'_' $(2) -o $(1) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
# MakeTranslation <where-are-po-files> : file1.po file2.po... ;
|
|
|
|
# TODO:
|
|
|
|
rule MakeTranslation
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
actions MakeTranslation1
|
|
|
|
{
|
2007-03-15 19:21:30 +03:00
|
|
|
}
|