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