]> icculus.org git repositories - btb/d2x.git/blob - Makefile.am
Fixed %include
[btb/d2x.git] / Makefile.am
1 SUBDIRS = 2d 3d maths mem cfile iff texmap misc input video sound arch main
2
3 EXTRA_SUBDIRS = includes tools unused
4
5 bin_PROGRAMS = @TARGETS@
6
7 EXTRA_PROGRAMS = d2x d2x-sdl d2x-ogl d2x-svga d2x-ggi
8
9 CCLD = ${CC}
10 LDFLAGS = -export-dynamic
11 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
12
13 if ENV_DJGPP
14 ARCH_LIBS = arch/dos/libarch_dos.a
15 else
16 if MINGW32
17 ARCH_LIBS = arch/win32/libarch_win32.a arch/sdl/libarch_sdl.a
18 else
19 ARCH_LIBS = arch/linux/libarch_linux.a arch/sdl/libarch_sdl.a
20 endif
21 endif
22
23 d2x_SOURCES =
24 d2x_sdl_SOURCES =
25 d2x_ogl_SOURCES =
26 d2x_svga_SOURCES =
27 d2x_ggi_SOURCES =
28
29 d2x_LDADD = main/libmain.a ${ARCH_LIBS} 3d/lib3d.a 2d/lib2d.a mem/libmem.a cfile/libcfile.a iff/libiff.a texmap/libtexmap.a misc/libmisc.a maths/libmaths.a video/libvideo.a sound/libsound.a input/libinput.a
30
31 if MINGW32
32 if USE_NETWORK
33 d2x_sdl_LDADD = ${d2x_LDADD} ${SDL_LIBS} -lwsock32
34 else
35 d2x_sdl_LDADD = ${d2x_LDADD} ${SDL_LIBS}
36 endif
37 else
38 d2x_sdl_LDADD = ${d2x_LDADD} -lm -ldl -lpthread ${SDL_LIBS}
39 endif
40 d2x_ogl_LDADD = ${d2x_sdl_LDADD} ${OGL_LIBS}
41 d2x_svga_LDADD = ${d2x_sdl_LDADD} ${SVGA_LIBS}
42 d2x_ggi_LDADD = ${d2x_sdl_LDADD} ${GGI_LIBS}
43
44 dist-hook:
45         list='$(EXTRA_SUBDIRS)'; for subdir in $$list; do \
46          ( cd $(srcdir) && tar --exclude=CVS/ -cf - $$subdir ) \
47           | ( cd $(distdir) && tar xf - ) \
48         done
49         $(MAKE) changelog
50         cp -a ChangeLog $(distdir)
51
52 changelog::
53         rm -f $(srcdir)/ChangeLog
54         touch $(srcdir)/ChangeLog
55         $(srcdir)/tools/cvs2cl/cvs2cl.pl -b --utc
56         rm -f ChangeLog.bak
57
58 EXTRA_DIST = \
59 ChangeLog \
60 djgpp.bat djgpp.sh \
61 autogen.sh cygconf \
62 cvshowto.txt readme.txt license.txt thinking.txt installation.txt mingw32.txt