Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Mon, 20 Feb 2006 11:29:36 +0000
changeset 1388 9a9b87172b4b
parent 1382 b34d38f76a2a
child 1390 67781f790694
permissions -rw-r--r--
Fixed build dependencies... ugh
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@1362
     9
bindir	= @bindir@
slouken@1362
    10
libdir  = @libdir@
slouken@1362
    11
includedir = @includedir@
slouken@1362
    12
datadir	= @datadir@
slouken@1362
    13
mandir	= @mandir@
slouken@1362
    14
distpath = $(srcdir)/..
slouken@1362
    15
distdir = SDL-@SDL_VERSION@
slouken@1362
    16
distfile = $(distdir).tar.gz
slouken@1362
    17
slouken@1380
    18
@SET_MAKE@
slouken@1362
    19
SHELL	= @SHELL@
slouken@1362
    20
CC      = @CC@
slouken@1362
    21
INCLUDE = @INCLUDE@
slouken@1362
    22
CFLAGS  = @BUILD_CFLAGS@
slouken@1362
    23
LDFLAGS = @BUILD_LIBS@
slouken@1362
    24
LIBTOOL = @LIBTOOL@
slouken@1362
    25
INSTALL = @INSTALL@
slouken@1362
    26
NASM	= @NASM@ @NASMFLAGS@
slouken@1362
    27
slouken@1362
    28
TARGET  = libSDL.la
slouken@1362
    29
SOURCES = @SOURCES@
slouken@1362
    30
OBJECTS = @OBJECTS@
slouken@1362
    31
slouken@1362
    32
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.in MPWmake.sea.bin PBProjects.tar.gz README* sdl-config.in sdl.m4 SDL.qpg.in SDL.spec SDL.spec.in setvars.cmd src test TODO VisualCE.zip VisualC.html VisualC.zip Watcom.mif WhatsNew Xcode21.tar.gz Xcode.tar.gz XcodeUniversal.tar.gz
slouken@1362
    33
slouken@1388
    34
BUILDC	= $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c `echo $? | sed 's| .*||'`  -o $@
slouken@1388
    35
BUILDCC	= $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c `echo $? | sed 's| .*||'`  -o $@
slouken@1388
    36
BUILDM	= $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c `echo $? | sed 's| .*||'`  -o $@
slouken@1362
    37
BUILDASM = $(LIBTOOL) --tag=CC --mode=compile @ac_aux_dir@/strip_fPIC.sh $(NASM) $? -o $@
slouken@1362
    38
slouken@1362
    39
LT_AGE      = @LT_AGE@
slouken@1362
    40
LT_CURRENT  = @LT_CURRENT@
slouken@1362
    41
LT_RELEASE  = @LT_RELEASE@
slouken@1362
    42
LT_REVISION = @LT_REVISION@
slouken@1362
    43
LT_LDFLAGS  = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
slouken@1362
    44
slouken@1362
    45
all: Makefile $(objects) $(objects)/$(TARGET)
slouken@1362
    46
slouken@1362
    47
Makefile: $(srcdir)/Makefile.in
slouken@1362
    48
	$(SHELL) config.status $@
slouken@1362
    49
slouken@1362
    50
$(objects):
slouken@1362
    51
	$(SHELL) @ac_aux_dir@/mkinstalldirs $@
slouken@1362
    52
slouken@1362
    53
.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
    54
depend:
slouken@1362
    55
	SOURCES="$(SOURCES)" INCLUDE="$(INCLUDE)" objects="$(objects)" output="$(depend)" \
slouken@1362
    56
	$(SHELL) @ac_aux_dir@/makedep.sh
slouken@1362
    57
slouken@1362
    58
include $(depend)
slouken@1362
    59
slouken@1362
    60
$(objects)/$(TARGET): $(OBJECTS)
slouken@1362
    61
	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBS) $(LT_LDFLAGS)
slouken@1362
    62
slouken@1362
    63
install: install-bin install-hdrs install-lib install-data install-man
slouken@1362
    64
install-bin:
slouken@1362
    65
	$(SHELL) @ac_aux_dir@/mkinstalldirs $(bindir)
slouken@1362
    66
	$(INSTALL) -m 755 $(srcdir)/sdl-config $(bindir)/sdl-config
slouken@1362
    67
install-hdrs:
slouken@1362
    68
	$(SHELL) @ac_aux_dir@/mkinstalldirs $(includedir)/SDL
slouken@1362
    69
	for src in $(srcdir)/include/*.h; do \
slouken@1362
    70
	    file=`echo $$src | sed -e 's|^.*/||'`; \
slouken@1362
    71
	    $(INSTALL) $$src $(includedir)/SDL/$$file; \
slouken@1362
    72
	done
slouken@1362
    73
	$(INSTALL) include/SDL_config.h $(includedir)/SDL/SDL_config.h
slouken@1362
    74
install-lib:
slouken@1362
    75
	$(SHELL) @ac_aux_dir@/mkinstalldirs $(libdir)
slouken@1362
    76
	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(libdir)/$(TARGET)
slouken@1362
    77
install-data:
slouken@1362
    78
	$(SHELL) @ac_aux_dir@/mkinstalldirs $(datadir)/aclocal
slouken@1362
    79
	$(INSTALL) $(srcdir)/sdl.m4 $(datadir)/aclocal/sdl.m4
slouken@1362
    80
install-man:
slouken@1362
    81
	$(SHELL) @ac_aux_dir@/mkinstalldirs $(mandir)/man3
slouken@1362
    82
	for src in $(srcdir)/docs/man3/*.3; do \
slouken@1362
    83
	    file=`echo $$src | sed -e 's|^.*/||'`; \
slouken@1362
    84
	    $(INSTALL) $$src $(mandir)/man3/$$file; \
slouken@1362
    85
	done
slouken@1362
    86
slouken@1362
    87
uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-man
slouken@1362
    88
uninstall-bin:
slouken@1362
    89
	rm -f $(bindir)/sdl-config
slouken@1362
    90
uninstall-hdrs:
slouken@1362
    91
	for src in $(srcdir)/include/*.h; do \
slouken@1362
    92
	    file=`echo $$src | sed -e 's|^.*/||'`; \
slouken@1362
    93
	    rm -f $(includedir)/SDL/$$file; \
slouken@1362
    94
	done
slouken@1362
    95
	rm -f $(includedir)/SDL/SDL_config.h
slouken@1362
    96
uninstall-lib:
slouken@1362
    97
	$(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(TARGET)
slouken@1362
    98
uninstall-data:
slouken@1362
    99
	rm -f $(datadir)/aclocal/sdl.m4
slouken@1362
   100
uninstall-man:
slouken@1362
   101
	for src in $(srcdir)/docs/man3/*.3; do \
slouken@1362
   102
	    file=`echo $$src | sed -e 's|^.*/||'`; \
slouken@1362
   103
	    rm -f $(mandir)/man3/$$file; \
slouken@1362
   104
	done
slouken@1362
   105
slouken@1362
   106
clean:
slouken@1362
   107
	rm -rf $(objects)
slouken@1380
   108
	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
slouken@1362
   109
slouken@1362
   110
distclean: clean
slouken@1362
   111
	rm -f Makefile include/SDL_config.h sdl-config
slouken@1362
   112
	rm -f SDL.qpg
slouken@1362
   113
	rm -f config.status config.cache config.log libtool $(depend)
slouken@1362
   114
	rm -rf $(srcdir)/autom4te*
slouken@1362
   115
	find $(srcdir) \
slouken@1362
   116
	    -name '*~' -o -name '*.bak' -o -name '*.old' -o -name '*.rej' -o \
slouken@1362
   117
	    -name '.#*' \
slouken@1362
   118
	    -exec rm -f {} \;
slouken@1362
   119
	cp include/SDL_config.h.minimal include/SDL_config.h
slouken@1380
   120
	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
slouken@1362
   121
slouken@1362
   122
dist $(distfile):
slouken@1362
   123
	$(SHELL) @ac_aux_dir@/mkinstalldirs $(distdir)
slouken@1362
   124
	tar cf - $(DIST) | (cd $(distdir); tar xf -)
slouken@1362
   125
	rm -rf `find $(distdir) -name CVS`
slouken@1382
   126
	rm -f `find $(distdir) -name '.cvsignore'`
slouken@1362
   127
	rm -f `find $(distdir) -name '.#*'`
slouken@1362
   128
	tar cvf - $(distdir) | gzip --best >$(distfile)
slouken@1362
   129
	rm -rf $(distdir)
slouken@1362
   130
slouken@1362
   131
rpm: $(distfile)
slouken@1362
   132
	rpmbuild -ta $?