]> icculus.org git repositories - btb/d2x.git/blob - main/Makefile.am
Moved arch/sdl_* to arch/sdl
[btb/d2x.git] / main / Makefile.am
1 EXTRA_SUBDIRS = editor old
2
3 CFLAGS += -fwritable-strings
4
5 INCLUDES = -I$(top_srcdir)/includes -I$(top_srcdir)/arch/include
6
7 bin_PROGRAMS = @TARGETS@
8
9 EXTRA_PROGRAMS = d2x d2x-sdl d2x-ogl d2x-svga d2x-ggi
10
11 LDFLAGS = -export-dynamic
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_LDADD = ${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
24
25 if MINGW32
26 if USE_NETWORK
27 d2x_sdl_LDADD = ${d2x_LDADD} ${SDL_LIBS} -lwsock32
28 else
29 d2x_sdl_LDADD = ${d2x_LDADD} ${SDL_LIBS}
30 endif
31 else
32 d2x_sdl_LDADD = ${d2x_LDADD} -lm -ldl -lpthread ${SDL_LIBS}
33 endif
34 d2x_ogl_LDADD = ${d2x_sdl_LDADD} ${OGL_LIBS}
35 d2x_svga_LDADD = ${d2x_sdl_LDADD} ${SVGA_LIBS}
36 d2x_ggi_LDADD = ${d2x_sdl_LDADD} ${GGI_LIBS}
37
38 if USE_NETWORK
39 NETWORK_SRCS = ipx_drv.c
40 else
41 NETWORK_SRCS =
42 endif
43
44 d2x_SOURCES = ${NETWORK_SRCS} \
45 ai.c        gamerend.c  lighting.c  paging.c    switch.c \
46 ai2.c       effects.c   gamesave.c  menu.c      physics.c   texmerge.c \
47 aipath.c    endlevel.c  gameseg.c   mglobal.c   piggy.c     text.c \
48 automap.c   escort.c    gameseq.c   mission.c   playsave.c  titles.c \
49 bm.c        fireball.c  gauges.c    morph.c     polyobj.c   vclip.c \
50 bmread.c    fuelcen.c   hostage.c   multi.c     powerup.c   wall.c \
51 cntrlcen.c  fvi.c       hud.c       multibot.c  render.c    weapon.c \
52 collide.c   game.c      inferno.c   netmisc.c   robot.c \
53 config.c    gamecntl.c  kconfig.c   network.c   scores.c \
54 controls.c  gamefont.c  kludge.c    newdemo.c   slew.c \
55 credits.c   gamemine.c  kmatrix.c   newmenu.c   songs.c \
56 crypt.c     gamepal.c   laser.c     object.c    state.c \
57 console.c   cmd.c
58
59 d2x_sdl_SOURCES = ${d2x_SOURCES}
60 d2x_ogl_SOURCES = ${d2x_SOURCES}
61 d2x_svga_SOURCES = ${d2x_SOURCES}
62 d2x_ggi_SOURCES = ${d2x_SOURCES}
63
64 EXTRA_DIST = \
65 descent.cfg inferno.ini \
66 link.bat \
67 ai.h aistruct.h automap.h bm.h bmread.h cdrom.h cntrlcen.h collide.h \
68 compbit.h config.h controls.h credits.h desc_id.h desw.h digi.h effects.h \
69 endlevel.h fireball.h fuelcen.h fvi.h fvi_a.h game.h gamefont.h gamemine.h \
70 gamepal.h gamesave.h gameseg.h gameseq.h gamestat.h gauges.h hostage.h \
71 inferno.h joydefs.h kconfig.h kmatrix.h laser.h lighting.h menu.h mission.h \
72 modem.h morph.h movie.h multi.h multibot.h netmisc.h network.h newdemo.h \
73 newmenu.h object.h paging.h physics.h piggy.h player.h playsave.h polyobj.h \
74 powerup.h render.h robot.h scores.h screens.h segment.h segpoint.h slew.h \
75 songs.h sounds.h state.h switch.h terrain.h texmerge.h text.h textures.h \
76 titles.h vclip.h vers_id.h wall.h weapon.h \
77 dumpmine.c ipx_drv.c
78
79 dist-hook:
80         list='$(EXTRA_SUBDIRS)'; for subdir in $$list; do \
81          ( cd $(srcdir) && tar --exclude=CVS -cf - $$subdir ) \
82           | ( cd $(distdir) && tar xf - ) \
83         done