1 # Makefile to build and install the SDL library
8 exec_prefix = @exec_prefix@
11 includedir = @includedir@
14 distpath = $(srcdir)/..
15 distdir = SDL-@SDL_VERSION@
16 distfile = $(distdir).tar.gz
21 CFLAGS = @BUILD_CFLAGS@
22 LDFLAGS = @BUILD_LIBS@
25 NASM = @NASM@ @NASMFLAGS@
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
33 BUILDC = $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $? -o $@
34 BUILDCC = $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $? -o $@
35 BUILDM = $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $? -o $@
36 BUILDASM = $(LIBTOOL) --tag=CC --mode=compile @ac_aux_dir@/strip_fPIC.sh $(NASM) $? -o $@
39 LT_CURRENT = @LT_CURRENT@
40 LT_RELEASE = @LT_RELEASE@
41 LT_REVISION = @LT_REVISION@
42 LT_LDFLAGS = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
44 all: Makefile $(objects) $(objects)/$(TARGET)
46 Makefile: $(srcdir)/Makefile.in
47 $(SHELL) config.status $@
50 $(SHELL) @ac_aux_dir@/mkinstalldirs $@
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
54 SOURCES="$(SOURCES)" INCLUDE="$(INCLUDE)" objects="$(objects)" output="$(depend)" \
55 $(SHELL) @ac_aux_dir@/makedep.sh
59 $(objects)/$(TARGET): $(OBJECTS)
60 $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBS) $(LT_LDFLAGS)
62 install: install-bin install-hdrs install-lib install-data install-man
64 $(SHELL) @ac_aux_dir@/mkinstalldirs $(bindir)
65 $(INSTALL) -m 755 $(srcdir)/sdl-config $(bindir)/sdl-config
67 $(SHELL) @ac_aux_dir@/mkinstalldirs $(includedir)/SDL
68 for src in $(srcdir)/include/*.h; do \
69 file=`echo $$src | sed -e 's|^.*/||'`; \
70 $(INSTALL) $$src $(includedir)/SDL/$$file; \
72 $(INSTALL) include/SDL_config.h $(includedir)/SDL/SDL_config.h
74 $(SHELL) @ac_aux_dir@/mkinstalldirs $(libdir)
75 $(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(libdir)/$(TARGET)
77 $(SHELL) @ac_aux_dir@/mkinstalldirs $(datadir)/aclocal
78 $(INSTALL) $(srcdir)/sdl.m4 $(datadir)/aclocal/sdl.m4
80 $(SHELL) @ac_aux_dir@/mkinstalldirs $(mandir)/man3
81 for src in $(srcdir)/docs/man3/*.3; do \
82 file=`echo $$src | sed -e 's|^.*/||'`; \
83 $(INSTALL) $$src $(mandir)/man3/$$file; \
86 uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-man
88 rm -f $(bindir)/sdl-config
90 for src in $(srcdir)/include/*.h; do \
91 file=`echo $$src | sed -e 's|^.*/||'`; \
92 rm -f $(includedir)/SDL/$$file; \
94 rm -f $(includedir)/SDL/SDL_config.h
96 $(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(TARGET)
98 rm -f $(datadir)/aclocal/sdl.m4
100 for src in $(srcdir)/docs/man3/*.3; do \
101 file=`echo $$src | sed -e 's|^.*/||'`; \
102 rm -f $(mandir)/man3/$$file; \
109 rm -f Makefile include/SDL_config.h sdl-config
111 rm -f config.status config.cache config.log libtool $(depend)
112 rm -rf $(srcdir)/autom4te*
114 -name '*~' -o -name '*.bak' -o -name '*.old' -o -name '*.rej' -o \
117 cp include/SDL_config.h.minimal include/SDL_config.h
120 $(SHELL) @ac_aux_dir@/mkinstalldirs $(distdir)
121 tar cf - $(DIST) | (cd $(distdir); tar xf -)
122 rm -rf `find $(distdir) -name CVS`
123 rm -f `find $(distdir) -name '.#*'`
124 tar cvf - $(distdir) | gzip --best >$(distfile)