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