src/main/Makefile.am
author Sam Lantinga <slouken@libsdl.org>
Sun, 21 Sep 2003 18:32:04 +0000
changeset 720 f90d80d68071
parent 371 db0cc6034336
child 754 623b453a3219
permissions -rw-r--r--
N Sep 17 8791 Sam Lantinga Re: tks source released
Date: Sun, 07 Sep 2003 02:51:58 +0200
From: Stephane Marchesin
Subject: [SDL] Two little patches

Compiling SDL with a recent gcc (gcc 3.3.1, 3.3 doesn't have this
behaviour) gives some nasty warnings :

SDL_blit_A.c: In function `BlitRGBtoRGBSurfaceAlpha128MMX':
SDL_blit_A.c:223: warning: integer constant is too large for "long" type
SDL_blit_A.c:225: warning: integer constant is too large for "long" type
SDL_blit_A.c:227: warning: integer constant is too large for "long" type
[...]

The first attached patch (longlongfix.patch) tells gcc to really treat
those constants as unsigned long long and not long.

The second patch (nasinclude.patch) fixes an include problem I had while
compiling nas audio : when the <audio/audiolib.h> file lies in
/usr/X11R6/include, a -I/usr/X11R6/include option is needed or the file
isn't found.
slouken@0
     1
slouken@0
     2
## Makefile.am for the main() function in the SDL library
slouken@0
     3
#
slouken@0
     4
# This is necessary because some platforms have special program
slouken@0
     5
# entry points, which require special application initialization.
slouken@0
     6
slouken@173
     7
ARCH_SUBDIRS = $(srcdir)/beos \
slouken@173
     8
               $(srcdir)/epoc \
slouken@173
     9
               $(srcdir)/linux \
slouken@173
    10
               $(srcdir)/macos \
slouken@221
    11
               $(srcdir)/macosx \
slouken@173
    12
               $(srcdir)/win32
slouken@0
    13
slouken@0
    14
# Build a separate library containing the main() entry point.
slouken@0
    15
lib_LIBRARIES = libSDLmain.a
slouken@0
    16
slouken@158
    17
if TARGET_MACOSX
slouken@194
    18
MAINLIB_ARCH_SRCS = SDLMain.m SDLMain.h
slouken@158
    19
else
slouken@371
    20
if TARGET_QTOPIA
slouken@371
    21
MAINLIB_ARCH_SRCS = SDL_Qtopia_main.cc
slouken@371
    22
else
slouken@0
    23
MAINLIB_ARCH_SRCS = SDL_main.c
slouken@158
    24
endif
slouken@371
    25
endif
slouken@0
    26
libSDLmain_a_SOURCES = $(MAINLIB_ARCH_SRCS)
slouken@0
    27
slouken@0
    28
# Build an internal library of any special app setup functions
slouken@0
    29
noinst_LTLIBRARIES = libarch.la
slouken@0
    30
slouken@0
    31
if TARGET_BEOS
slouken@0
    32
ARCH_SRCS = SDL_BeApp.cc SDL_BeApp.h
slouken@0
    33
else
slouken@0
    34
ARCH_SRCS = 
slouken@0
    35
endif
slouken@0
    36
slouken@0
    37
# Include the architecture-independent sources
slouken@0
    38
COMMON_SRCS = dummy.c
slouken@0
    39
slouken@0
    40
libarch_la_SOURCES = $(COMMON_SRCS) $(ARCH_SRCS)
slouken@0
    41
slouken@0
    42
## Let automake know that it shouldn't distribute linked sources
slouken@0
    43
BUILT_SOURCES = $(MAINLIB_ARCH_SRCS) $(ARCH_SRCS)
slouken@0
    44
slouken@0
    45
## Let automake know that it should remove these for distribution
slouken@0
    46
DISTCLEANFILES = $(MAINLIB_ARCH_SRCS) $(ARCH_SRCS)
slouken@0
    47
slouken@0
    48
# The architecture specific directories need to be copied into place
slouken@0
    49
# when building a distribution.
slouken@0
    50
dist-hook:
slouken@0
    51
	(cd $(distdir) && rm -f $(BUILT_SOURCES))
slouken@0
    52
	cp -rp $(ARCH_SUBDIRS) $(distdir)
slouken@0
    53
	(cd $(distdir) && rm -rf `find . -name CVS`)