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