]> icculus.org git repositories - btb/d2x.git/blob - Makefile.am
use __unix__
[btb/d2x.git] / Makefile.am
1 SUBDIRS = 2d 3d maths mem cfile iff texmap misc arch main
2
3 EXTRA_SUBDIRS = include tools unused debian rpm
4
5 bin_PROGRAMS = @TARGETS@
6
7 EXTRA_PROGRAMS = d2x d2x-sdl d2x-gl d2x-svga d2x-ggi
8
9 ARCH_LIBS = $(foreach subdir,${D2X_ARCH_SUBDIRS},arch/${subdir}/libarch_${subdir}.a)
10
11 if MINGW32
12 LD_KLUDGE = main/inferno.o
13 endif
14
15 if EDITOR
16 EDITOR_LIBS = main/editor/libeditor.a
17 endif
18
19 d2x_SOURCES =
20 d2x_sdl_SOURCES =
21 d2x_gl_SOURCES =
22 d2x_svga_SOURCES =
23 d2x_ggi_SOURCES =
24
25 d2x_LDADD = ${LD_KLUDGE} main/libmain.a ${EDITOR_LIBS} 3d/lib3d.a 2d/lib2d.a ${ARCH_LIBS} mem/libmem.a cfile/libcfile.a iff/libiff.a texmap/libtexmap.a misc/libmisc.a maths/libmaths.a
26
27 if MINGW32
28 if USE_NETWORK
29 d2x_sdl_LDADD = ${d2x_LDADD} -lwsock32
30 else
31 d2x_sdl_LDADD = ${d2x_LDADD}
32 endif
33 else
34 d2x_sdl_LDADD = ${d2x_LDADD} -lm
35 endif
36 d2x_gl_LDADD = ${d2x_sdl_LDADD} ${OGL_LIBS}
37 d2x_svga_LDADD = ${d2x_sdl_LDADD} ${SVGA_LIBS}
38 d2x_ggi_LDADD = ${d2x_sdl_LDADD} ${GGI_LIBS}
39
40 dist-hook:
41         rm -rf `find $(distdir) -name CVS`
42 #       rm -f `find $(distdir) -name Makefile`
43         $(MAKE) changelog
44         cp -a $(srcdir)/ChangeLog $(distdir)
45
46 changelog::
47         cd $(srcdir) && tools/cvs2cl/cvs2cl.pl -b --utc --accum
48 #       rm -f $(srcdir)/ChangeLog.bak
49
50 EXTRA_DIST = ${EXTRA_SUBDIRS} \
51 ChangeLog \
52 djgpp.bat djgpp.sh \
53 autogen.sh cygconf \
54 cvshowto.txt readme.txt installation.txt mingw32.txt compilerdefs.txt \
55 d2x-sdl.sh d2x-gl.sh