]> icculus.org git repositories - theoddone33/hheretic.git/blob - Makefile
Deal with SDL stupidity on OSX, fix another 64 bit issue. OMG game runs.
[theoddone33/hheretic.git] / Makefile
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
8 CFLAGS = $(CPPFLAGS)
9
10 #CPPFLAGS += -m32 -I./include
11 #LDFLAGS += -m32 -framework SDL
12
13 CPPFLAGS += -I./include -g
14 LDFLAGS += -framework SDL -framework Cocoa
15
16 CC := clang
17
18 # Objects to build
19
20 SDLOBJS = \
21         sdl/i_sdl.o \
22         sdl/SDLMain.m
23
24 GLBASE = @GLBASE@
25
26 GLOBJS = \
27         opengl/ogl_clip.o \
28         opengl/ogl_draw.o \
29         opengl/ogl_font.o \
30         opengl/ogl_rend.o \
31         opengl/ogl_rl.o \
32         opengl/ogl_sky.o \
33         opengl/ogl_tex.o \
34         opengl/m_bams.o
35
36 BASEOBJS = \
37         base/i_linux.o \
38         base/i_sound.o \
39         base/am_map.o \
40         base/ct_chat.o \
41         base/d_net.o \
42         base/f_finale.o \
43         base/g_game.o \
44         base/d_main.o \
45         base/info.o \
46         base/in_lude.o \
47         base/mn_menu.o \
48         base/m_misc.o \
49         base/p_ceilng.o \
50         base/p_doors.o \
51         base/p_enemy.o \
52         base/p_floor.o \
53         base/p_inter.o \
54         base/p_lights.o \
55         base/p_map.o \
56         base/p_maputl.o \
57         base/p_mobj.o \
58         base/p_plats.o \
59         base/p_pspr.o \
60         base/p_setup.o \
61         base/p_sight.o \
62         base/p_spec.o \
63         base/p_switch.o \
64         base/p_telept.o \
65         base/p_tick.o \
66         base/p_user.o \
67         base/r_bsp.o \
68         base/r_data.o \
69         base/r_draw.o \
70         base/r_main.o \
71         base/r_plane.o \
72         base/r_segs.o \
73         base/r_things.o \
74         base/sb_bar.o \
75         base/sounds.o \
76         base/tables.o \
77         base/v_video.o \
78         base/w_wad.o \
79         base/z_zone.o
80
81 all: hheretic-sdl
82
83 hheretic-sdl: $(SDLOBJS) $(BASEOBJS)
84         $(CC) -o hheretic-sdl $(LDFLAGS) $(SDLOBJS) $(BASEOBJS) $(SDLLIBS)
85
86 hheretic-gl: $(GLBASE) $(GLOBJS) $(BASEOBJS)
87         $(CC) -o hheretic-gl $(GLBASE) $(GLOBJS) $(BASEOBJS) $(GLLIBS) $(SDLLIBS)
88
89 clean:
90         $(RM) base/*.o
91         $(RM) x11/*.o
92         $(RM) svgalib/*.o
93         $(RM) opengl/*.o
94         $(RM) sdl/*.o
95
96 %.o: %.c
97         $(CC) $< -o $@ -c $(CFLAGS) 
98
99 %.o: %.m
100         $(CC) $< -o $@ -c $(CFLAGS) 
101
102 %.o: %.cpp
103         $(CXX) $< -o $@ -c $(CPPFLAGS)
104