Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Tue, 09 May 2006 07:26:58 +0000
changeset 1790 828a17e05192
parent 1774 92354d20a3ce
child 1845 548445edaf9f
permissions -rw-r--r--
Date: Mon, 8 May 2006 14:19:30 -0700
From: Bob Ippolito
Subject: SDL trunk (r2346) and Mac OS X

The current state of the trunk doesn't quite compile on Mac OS X,
I've attached a series of patches that gets it to compile and kills a
few warnings.

sdl-trunk-r2346-dlcompat-warnings.diff:
The dlcompat thing is just loaded with incorrect type signatures ..
some of them have changed since 10.2 and others are just flat wrong.
This puts it in sync with the latest headers. People on 10.2 will get
the warnings instead of people with new kits.
slouken@1362
     1
# Makefile to build and install the SDL library
slouken@1362
     2
slouken@1362
     3
top_builddir = .
slouken@1362
     4
srcdir  = @srcdir@
slouken@1362
     5
objects = build
slouken@1362
     6
depend	= build-deps
slouken@1362
     7
prefix = @prefix@
slouken@1362
     8
exec_prefix = @exec_prefix@
slouken@1390
     9
bindir	= $(DESTDIR)@bindir@
slouken@1390
    10
libdir  = $(DESTDIR)@libdir@
slouken@1390
    11
includedir = $(DESTDIR)@includedir@
slouken@1390
    12
datadir	= $(DESTDIR)@datadir@
slouken@1390
    13
mandir	= $(DESTDIR)@mandir@
slouken@1391
    14
auxdir	= @ac_aux_dir@
slouken@1362
    15
distpath = $(srcdir)/..
slouken@1362
    16
distdir = SDL-@SDL_VERSION@
slouken@1362
    17
distfile = $(distdir).tar.gz
slouken@1362
    18
slouken@1380
    19
@SET_MAKE@
slouken@1362
    20
SHELL	= @SHELL@
slouken@1362
    21
CC      = @CC@
slouken@1362
    22
INCLUDE = @INCLUDE@
slouken@1362
    23
CFLAGS  = @BUILD_CFLAGS@
slouken@1521
    24
EXTRA_CFLAGS = @EXTRA_CFLAGS@
slouken@1393
    25
LDFLAGS = @BUILD_LDFLAGS@
slouken@1521
    26
EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
slouken@1362
    27
LIBTOOL = @LIBTOOL@
slouken@1362
    28
INSTALL = @INSTALL@
slouken@1362
    29
NASM	= @NASM@ @NASMFLAGS@
slouken@1419
    30
AR	= @AR@
slouken@1419
    31
RANLIB	= @RANLIB@
slouken@1362
    32
slouken@1362
    33
TARGET  = libSDL.la
slouken@1362
    34
SOURCES = @SOURCES@
slouken@1362
    35
OBJECTS = @OBJECTS@
slouken@1362
    36
slouken@1397
    37
SDLMAIN_TARGET = libSDLmain.a
slouken@1397
    38
SDLMAIN_SOURCES = @SDLMAIN_SOURCES@
slouken@1397
    39
SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
slouken@1397
    40
slouken@1770
    41
DIST = acinclude.m4 autogen.sh Borland.html Borland.zip BUGS build-scripts configure configure.in COPYING CREDITS CWprojects.sea.bin docs docs.html EpocBuildFiles.zip include INSTALL Makefile.dc Makefile.minimal Makefile.in MPWmake.sea.bin README* sdl-config.in sdl.m4 SDL.qpg.in SDL.spec SDL.spec.in src test TODO VisualCE.zip VisualC.html VisualC.zip Watcom-OS2.zip Watcom-Win32.zip WhatsNew Xcode.tar.gz
slouken@1362
    42
slouken@1362
    43
LT_AGE      = @LT_AGE@
slouken@1362
    44
LT_CURRENT  = @LT_CURRENT@
slouken@1362
    45
LT_RELEASE  = @LT_RELEASE@
slouken@1362
    46
LT_REVISION = @LT_REVISION@
slouken@1362
    47
LT_LDFLAGS  = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
slouken@1362
    48
slouken@1622
    49
all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
slouken@1622
    50
slouken@1622
    51
$(srcdir)/configure: $(srcdir)/configure.in
slouken@1622
    52
	@echo "Warning, configure.in is out of date"
slouken@1622
    53
	#(cd $(srcdir) && sh autogen.sh && sh configure)
slouken@1623
    54
	@sleep 3
slouken@1362
    55
slouken@1362
    56
Makefile: $(srcdir)/Makefile.in
slouken@1362
    57
	$(SHELL) config.status $@
slouken@1362
    58
slouken@1362
    59
$(objects):
slouken@1391
    60
	$(SHELL) $(auxdir)/mkinstalldirs $@
slouken@1362
    61
slouken@1362
    62
.PHONY: all depend install install-bin install-hdrs install-lib install-data install-man uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data uninstall-man clean distclean dist
slouken@1362
    63
depend:
slouken@1634
    64
	@SOURCES="$(SOURCES)" INCLUDE="$(INCLUDE)" output="$(depend)" \
slouken@1391
    65
	$(SHELL) $(auxdir)/makedep.sh
slouken@1419
    66
	@for src in $(SDLMAIN_SOURCES); do \
slouken@1397
    67
	    obj=`echo $$src | sed -e 's|.*/||' -e 's|\.[^\.]*$$|.o|'`; \
slouken@1634
    68
	    echo "\$$(objects)/$$obj: $$src" >>$(depend); \
slouken@1522
    69
	    echo "	\$$(CC) \$$(CFLAGS) \$$(EXTRA_CFLAGS) -c $$src -o \$$@" >>$(depend); \
slouken@1397
    70
	done
slouken@1362
    71
slouken@1362
    72
include $(depend)
slouken@1362
    73
slouken@1362
    74
$(objects)/$(TARGET): $(OBJECTS)
slouken@1521
    75
	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
slouken@1362
    76
slouken@1397
    77
$(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
slouken@1419
    78
	$(AR) cru $@ $(SDLMAIN_OBJECTS)
slouken@1419
    79
	$(RANLIB) $@
slouken@1397
    80
slouken@1764
    81
install: all install-bin install-hdrs install-lib install-data install-man
slouken@1362
    82
install-bin:
slouken@1391
    83
	$(SHELL) $(auxdir)/mkinstalldirs $(bindir)
slouken@1476
    84
	$(INSTALL) -m 755 sdl-config $(bindir)/sdl-config
slouken@1362
    85
install-hdrs:
slouken@1391
    86
	$(SHELL) $(auxdir)/mkinstalldirs $(includedir)/SDL
slouken@1362
    87
	for src in $(srcdir)/include/*.h; do \
slouken@1362
    88
	    file=`echo $$src | sed -e 's|^.*/||'`; \
slouken@1394
    89
	    $(INSTALL) -m 644 $$src $(includedir)/SDL/$$file; \
slouken@1362
    90
	done
slouken@1394
    91
	$(INSTALL) -m 644 include/SDL_config.h $(includedir)/SDL/SDL_config.h
slouken@1362
    92
install-lib:
slouken@1391
    93
	$(SHELL) $(auxdir)/mkinstalldirs $(libdir)
slouken@1362
    94
	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(libdir)/$(TARGET)
slouken@1397
    95
	$(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(libdir)/$(SDLMAIN_TARGET)
slouken@1419
    96
	$(RANLIB) $(libdir)/$(SDLMAIN_TARGET)
slouken@1362
    97
install-data:
slouken@1391
    98
	$(SHELL) $(auxdir)/mkinstalldirs $(datadir)/aclocal
slouken@1394
    99
	$(INSTALL) -m 644 $(srcdir)/sdl.m4 $(datadir)/aclocal/sdl.m4
slouken@1362
   100
install-man:
slouken@1391
   101
	$(SHELL) $(auxdir)/mkinstalldirs $(mandir)/man3
slouken@1362
   102
	for src in $(srcdir)/docs/man3/*.3; do \
slouken@1362
   103
	    file=`echo $$src | sed -e 's|^.*/||'`; \
slouken@1394
   104
	    $(INSTALL) -m 644 $$src $(mandir)/man3/$$file; \
slouken@1362
   105
	done
slouken@1362
   106
slouken@1603
   107
uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data uninstall-man
slouken@1362
   108
uninstall-bin:
slouken@1362
   109
	rm -f $(bindir)/sdl-config
slouken@1362
   110
uninstall-hdrs:
slouken@1362
   111
	for src in $(srcdir)/include/*.h; do \
slouken@1362
   112
	    file=`echo $$src | sed -e 's|^.*/||'`; \
slouken@1362
   113
	    rm -f $(includedir)/SDL/$$file; \
slouken@1362
   114
	done
slouken@1362
   115
	rm -f $(includedir)/SDL/SDL_config.h
slouken@1603
   116
	-rmdir $(includedir)/SDL
slouken@1362
   117
uninstall-lib:
slouken@1362
   118
	$(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(TARGET)
slouken@1397
   119
	rm -f $(libdir)/$(SDLMAIN_TARGET)
slouken@1362
   120
uninstall-data:
slouken@1362
   121
	rm -f $(datadir)/aclocal/sdl.m4
slouken@1362
   122
uninstall-man:
slouken@1362
   123
	for src in $(srcdir)/docs/man3/*.3; do \
slouken@1362
   124
	    file=`echo $$src | sed -e 's|^.*/||'`; \
slouken@1362
   125
	    rm -f $(mandir)/man3/$$file; \
slouken@1362
   126
	done
slouken@1362
   127
slouken@1362
   128
clean:
slouken@1362
   129
	rm -rf $(objects)
slouken@1380
   130
	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
slouken@1362
   131
slouken@1362
   132
distclean: clean
slouken@1362
   133
	rm -f Makefile include/SDL_config.h sdl-config
slouken@1362
   134
	rm -f SDL.qpg
slouken@1362
   135
	rm -f config.status config.cache config.log libtool $(depend)
slouken@1362
   136
	rm -rf $(srcdir)/autom4te*
slouken@1603
   137
	find $(srcdir) \( \
slouken@1603
   138
	    -name '*~' -o \
slouken@1603
   139
	    -name '*.bak' -o \
slouken@1603
   140
	    -name '*.old' -o \
slouken@1603
   141
	    -name '*.rej' -o \
slouken@1603
   142
	    -name '*.orig' -o \
slouken@1603
   143
	    -name '.#*' \) \
slouken@1362
   144
	    -exec rm -f {} \;
slouken@1603
   145
	cp $(srcdir)/include/SDL_config.h.default $(srcdir)/include/SDL_config.h
slouken@1380
   146
	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
slouken@1362
   147
slouken@1362
   148
dist $(distfile):
slouken@1391
   149
	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
slouken@1362
   150
	tar cf - $(DIST) | (cd $(distdir); tar xf -)
slouken@1603
   151
	cp $(distdir)/include/SDL_config.h.default $(distdir)/include/SDL_config.h
slouken@1651
   152
	rm -rf `find $(distdir) -name .svn`
slouken@1362
   153
	rm -f `find $(distdir) -name '.#*'`
slouken@1362
   154
	tar cvf - $(distdir) | gzip --best >$(distfile)
slouken@1362
   155
	rm -rf $(distdir)
slouken@1362
   156
slouken@1362
   157
rpm: $(distfile)
slouken@1362
   158
	rpmbuild -ta $?
slouken@1424
   159
slouken@1651
   160
# Create a SVN snapshot that people can run update on
slouken@1424
   161
snapshot:
slouken@1651
   162
	svn co svn://libsdl.org/trunk/SDL
slouken@1651
   163
	(cd SDL && ./autogen.sh && rm -rf autom4te.cache)
slouken@1651
   164
	cp SDL/include/SDL_config.h.default SDL/include/SDL_config.h
slouken@1651
   165
	mv SDL SDL-1.2
slouken@1448
   166
	tar zcf $(HOME)/SDL-1.2.tar.gz SDL-1.2
slouken@1451
   167
	rm -f $(HOME)/SDL-1.2.zip
slouken@1448
   168
	zip -r $(HOME)/SDL-1.2.zip SDL-1.2
slouken@1424
   169
	rm -rf SDL-1.2