]> icculus.org git repositories - btb/d2x.git/blob - Makefile.am
fc7eeacfbfc3e469686aa5f926bff67a8491de2b
[btb/d2x.git] / Makefile.am
1 SUBDIRS = 2d 3d maths mem cfile iff texmap misc 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 LD_KLUDGE = main/inferno.o
19 else
20 ARCH_LIBS = arch/linux/libarch_linux.a arch/sdl/libarch_sdl.a
21 endif
22 endif
23
24 d2x_SOURCES =
25 d2x_sdl_SOURCES =
26 d2x_ogl_SOURCES =
27 d2x_svga_SOURCES =
28 d2x_ggi_SOURCES =
29
30 d2x_LDADD = ${LD_KLUDGE} main/libmain.a 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 video/libvideo.a sound/libsound.a input/libinput.a
31
32 if MINGW32
33 if USE_NETWORK
34 d2x_sdl_LDADD = ${d2x_LDADD} ${SDL_LIBS} -lwsock32
35 else
36 d2x_sdl_LDADD = ${d2x_LDADD} ${SDL_LIBS}
37 endif
38 else
39 d2x_sdl_LDADD = ${d2x_LDADD} -lm -ldl -lpthread ${SDL_LIBS}
40 endif
41 d2x_ogl_LDADD = ${d2x_sdl_LDADD} ${OGL_LIBS}
42 d2x_svga_LDADD = ${d2x_sdl_LDADD} ${SVGA_LIBS}
43 d2x_ggi_LDADD = ${d2x_sdl_LDADD} ${GGI_LIBS}
44
45 dist-hook:
46         rm -rf `find $(distdir) -name CVS`
47 #       rm -f `find $(distdir) -name Makefile`
48         $(MAKE) changelog
49         cp -a $(srcdir)/ChangeLog $(distdir)
50
51 changelog::
52         rm -f $(srcdir)/ChangeLog
53         touch $(srcdir)/ChangeLog
54         cd $(srcdir) && tools/cvs2cl/cvs2cl.pl -b --utc
55         rm -f $(srcdir)/ChangeLog.bak
56
57 EXTRA_DIST = ${EXTRA_SUBDIRS} \
58 ChangeLog \
59 djgpp.bat djgpp.sh \
60 autogen.sh cygconf \
61 cvshowto.txt readme.txt license.txt thinking.txt installation.txt mingw32.txt