Initial revision
[theoddone33/hheretic.git] / Makefile.in
1 # This Makefile understands the following targets:
2 #
3 # sdl                   build SDL (software) version
4 # clean:                remove all intermediate files
5
6 # Basic stuff
7 SHELL = /bin/sh
8 VPATH = @srcdir@
9
10 top_srcdir = @top_srcdir@
11 srcdir = @srcdir@
12 prefix = @prefix@
13 exec_prefix = @exec_prefix@
14 bindir = $(exec_prefix)/bin
15 infodir = $(prefix)/info
16 libdir = $(prefix)/lib/gnudl
17 mandir = $(prefix)/man/man1
18 includedir = $(prefix)/include
19
20 CC = @CC@
21 DEFS = @DEFS@
22 CPPFLAGS = @CPPFLAGS@ @CFLAGS@
23 CFLAGS = $(CPPFLAGS) 
24 LDFLAGS = @LDFLAGS@
25 BLIBS = @BASELIBS@
26 GLLIBS = @GLLIBS@ -L/usr/X11R6/lib -lGL -lGLU
27 SDLLIBS = @SDL_LIBS@ 
28 SDLFLAGS = @SDL_CFLAGS@
29 GLHEXEN = @GLHEXEN@
30 HAVE_SDL = @HAVESDL@
31
32 # Directories
33
34 TOPSRCDIR = @top_srcdir@
35 TOPOBJDIR = .
36 SRCDIR    = @srcdir@
37 VPATH     = @srcdir@
38 MODULE    = none
39
40 INCSUBDIR = include
41
42 CPPFLAGS += -I./include
43
44 # Objects to build
45
46 SDLOBJS = \
47         sdl/i_sdl.o
48
49 GLBASE = @GLBASE@
50
51 GLOBJS = \
52         opengl/ogl_clip.o \
53         opengl/ogl_draw.o \
54         opengl/ogl_font.o \
55         opengl/ogl_rend.o \
56         opengl/ogl_rl.o \
57         opengl/ogl_sky.o \
58         opengl/ogl_tex.o \
59         opengl/m_bams.o
60
61 BASEOBJS = \
62         base/i_linux.o \
63         base/oss.o \
64         base/i_sound.o \
65         base/am_map.o \
66         base/ct_chat.o \
67         base/d_net.o \
68         base/f_finale.o \
69         base/g_game.o \
70         base/d_main.o \
71         base/info.o \
72         base/in_lude.o \
73         base/mn_menu.o \
74         base/m_misc.o \
75         base/p_ceilng.o \
76         base/p_doors.o \
77         base/p_enemy.o \
78         base/p_floor.o \
79         base/p_inter.o \
80         base/p_lights.o \
81         base/p_map.o \
82         base/p_maputl.o \
83         base/p_mobj.o \
84         base/p_plats.o \
85         base/p_pspr.o \
86         base/p_setup.o \
87         base/p_sight.o \
88         base/p_spec.o \
89         base/p_switch.o \
90         base/p_telept.o \
91         base/p_tick.o \
92         base/p_user.o \
93         base/r_bsp.o \
94         base/r_data.o \
95         base/r_draw.o \
96         base/r_main.o \
97         base/r_plane.o \
98         base/r_segs.o \
99         base/r_things.o \
100         base/sb_bar.o \
101         base/sounds.o \
102         base/tables.o \
103         base/v_video.o \
104         base/w_wad.o \
105         base/z_zone.o
106
107 ifeq "$(GLHEXEN)" "true"
108 opengl: $(GLBASE) $(GLOBJS) $(BASEOBJS)
109         $(CC) -o hheretic-gl $(GLBASE) $(GLOBJS) $(BASEOBJS) $(GLLIBS) $(SDLLIBS)
110 else
111 ifeq "$(HAVE_SDL)" "yes"
112 sdl: $(SDLOBJS) $(BASEOBJS)
113         $(CC) -o hheretic-sdl $(SDLOBJS) $(BASEOBJS) $(SDLLIBS)
114 endif
115 endif
116
117 clean:
118         $(RM) base/*.o
119         $(RM) x11/*.o
120         $(RM) svgalib/*.o
121         $(RM) opengl/*.o
122         $(RM) sdl/*.o
123
124 %.o: %.c
125         $(CC) $< -o $@ -c $(CFLAGS) 
126
127 %.o: %.cpp
128         $(CXX) $< -o $@ -c $(CPPFLAGS)