src/main/Makefile.am
author Sam Lantinga
Mon, 06 Feb 2006 08:28:51 +0000
changeset 1330 450721ad5436
parent 1133 609c060fd2a2
child 1361 19418e4422cb
permissions -rw-r--r--
It's now possible to build SDL without any C runtime at all on Windows,
using Visual C++ 2005
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@754
     9
               $(srcdir)/dummy \
slouken@173
    10
               $(srcdir)/macos \
slouken@221
    11
               $(srcdir)/macosx \
slouken@754
    12
               $(srcdir)/qtopia \
slouken@173
    13
               $(srcdir)/win32
slouken@0
    14
slouken@0
    15
# Build a separate library containing the main() entry point.
slouken@0
    16
lib_LIBRARIES = libSDLmain.a
slouken@0
    17
slouken@754
    18
if TARGET_WIN32
slouken@754
    19
MAINLIB_ARCH_SRCS = win32/SDL_win32_main.c
slouken@754
    20
else
slouken@158
    21
if TARGET_MACOSX
icculus@1133
    22
if USE_COCOA
slouken@754
    23
MAINLIB_ARCH_SRCS = macosx/SDLMain.m macosx/SDLMain.h
slouken@158
    24
else
icculus@1133
    25
if USE_CARBON
icculus@1133
    26
MAINLIB_ARCH_SRCS = macos/SDL_main.c
icculus@1133
    27
endif # USE_CARBON
icculus@1133
    28
endif # USE_COCOA
icculus@1133
    29
else
slouken@371
    30
if TARGET_QTOPIA
slouken@754
    31
MAINLIB_ARCH_SRCS = qtopia/SDL_qtopia_main.cc
slouken@371
    32
else
slouken@754
    33
MAINLIB_ARCH_SRCS = dummy/SDL_dummy_main.c
slouken@812
    34
endif # !TARGET_QTOPIA
slouken@812
    35
endif # !TARGET_MACOSX
slouken@812
    36
endif # !TARGET_WIN32
slouken@0
    37
libSDLmain_a_SOURCES = $(MAINLIB_ARCH_SRCS)
slouken@0
    38
slouken@0
    39
# Build an internal library of any special app setup functions
slouken@0
    40
noinst_LTLIBRARIES = libarch.la
slouken@0
    41
slouken@0
    42
if TARGET_BEOS
slouken@754
    43
ARCH_SRCS = beos/SDL_BeApp.cc beos/SDL_BeApp.h
slouken@0
    44
else
slouken@754
    45
ARCH_SRCS = arch.c
slouken@0
    46
endif
slouken@0
    47
slouken@754
    48
libarch_la_SOURCES = $(ARCH_SRCS)
slouken@0
    49
slouken@792
    50
exports:
slouken@792
    51
	for i in $(ARCH_SUBDIRS); do if [ -d $$i/exports ]; then (cd $$i/exports; make); fi; done
slouken@792
    52
slouken@0
    53
# The architecture specific directories need to be copied into place
slouken@0
    54
# when building a distribution.
slouken@0
    55
dist-hook:
slouken@0
    56
	(cd $(distdir) && rm -f $(BUILT_SOURCES))
slouken@0
    57
	cp -rp $(ARCH_SUBDIRS) $(distdir)
slouken@0
    58
	(cd $(distdir) && rm -rf `find . -name CVS`)