On Wed, 05 Nov 2008 13:38:55 Hal V. Engel wrote:
> The patch has the makefile.  I only had to add the include for stddef.h and
> add -fPIC to the CFLAGS line of the makefile that the patch created and it
> built.

Yes. My bad. Too dumb to use a GUI app (Kompare) that my mailer launched on 
the click onto the file ... :-/

> I didn't need to do this.  The only place NON_WINDOWS is used is in
> cmscgats.c and it is used to #include <sys/io.h>, define the directory
> seperator character and in a function that checks to see if the path is
> absolute. Adding this to my CFLAGS didn't seem to affect compilation at all
> on my system.  Does cmscgats.c even need anything form sys/io.h?

Yepp, now it also works without that one, after applying Kai-Uwe's patch 
*properly*. And now I can also build it using my SConscript (attached, for 
whoever likes SCons better than make, like I do).

Guy

-- 
Guy K. Kloss
Institute of Information and Mathematical Sciences
Te Kura Putaiao o Mohiohio me Pangarau
Room 2.63, Quad Block A Building
Massey University, Auckland, Albany
Private Bag 102 904, North Shore Mail Centre
voice: +64 9 414-0800 ext. 9585   fax: +64 9 441-8181
eMail: [EMAIL PROTECTED]  http://iims.massey.ac.nz

"""
## SConstruct
## 
## SCons build file for the project.
## 
## Created: 2008-11-04 Guy K. Kloss <[EMAIL PROTECTED]>
## Changed:
## 
## Version: $$Id$$
## 
## Copyright (C) 2008 Massey University, New Zealand
## 
## All rights reserved
## 
## http://www.massey.ac.nz/~gkloss/
##
"""

import os
import os.path

# Get build mode and check if the user has been naughty:
# only 'debug' or 'release' allowed
build_mode = ARGUMENTS.get('mode', 'debug')   #holds current mode
build_mode = build_mode.lower()

if not (build_mode in ['debug', 'release']):
    print "Error: expected 'debug' or 'release', found: " + build_mode
    Exit(1)

## Project settings:

SHARED_OBJECT_NAME = 'lcms2'
SOURCE_PATH_PREFIX = 'src'
CODE_EXTENSIONS = ['.c']
EXCLUDE_FILES = ['cmsps2.c']
DESTINATION_PATHS = {'debug': 'Debug',
                     'release': 'Release'}
destination_path = DESTINATION_PATHS[build_mode]

## Library and code settings:

LIBS = ['c', 'm', 'pthread', 'tiff', 'z']
LIB_PATHS = ['/usr/lib']
INCLUDE_PATHS = ['/usr/include',
                 'include']

## Compiler settings:

CC_FLAGS = ['-Wall', '-fmessage-length=0', '-fPIC']
MODE_FLAGS = {'debug': ['-DEFENCE', '-O0', '-g3'],
              'release':  ['-O3']}
LINKFLAGS = ['-Wl,-no-undefined']

#### Do the building:
def get_source_files():
    source_files = os.listdir(os.path.join(os.getcwd(), SOURCE_PATH_PREFIX))
    source_files = [x for x in source_files \
                    if os.path.splitext(x)[1] in CODE_EXTENSIONS]
    for item in EXCLUDE_FILES:
        source_files.remove(item)
    source_files = [os.path.join(destination_path, x) for x in source_files]
    return source_files

env = Environment()
env.Repository(SOURCE_PATH_PREFIX)

env.BuildDir(destination_path,
             SOURCE_PATH_PREFIX,
             duplicate=False)

module = env.SharedLibrary(target=SHARED_OBJECT_NAME,
                           source=get_source_files(),
                           LIBS=LIBS,
                           LIBPATH=LIB_PATHS,
                           CPPPATH=INCLUDE_PATHS,
                           CCFLAGS=CC_FLAGS + MODE_FLAGS[build_mode],
                           SHLIBPREFIX='lib',
                           SHLIBSUFFIX='.so',
                           LINKFLAGS=LINKFLAGS)
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to