Add makefile now that it's no longer generated by autoconf
authorDan Olson <theoddone33@icculus.org>
Sun, 20 Mar 2011 08:20:50 +0000 (01:20 -0700)
committerDan Olson <theoddone33@icculus.org>
Sun, 20 Mar 2011 08:20:50 +0000 (01:20 -0700)
.gitignore
Makefile [new file with mode: 0644]

index 7e097a0..badd832 100644 (file)
@@ -1,4 +1,3 @@
-Makefile
 config.cache
 config.log
 config.status
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..a9ed7dc
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,99 @@
+# This Makefile understands the following targets:
+#
+# sdl                  build SDL (software) version
+# clean:               remove all intermediate files
+
+# Basic stuff
+
+CFLAGS = $(CPPFLAGS)
+
+#CPPFLAGS += -m32 -I./include
+#LDFLAGS += -m32 -framework SDL
+
+CPPFLAGS += -I./include
+LDFLAGS += -framework SDL
+
+CC := clang
+
+# Objects to build
+
+SDLOBJS = \
+       sdl/i_sdl.o
+
+GLBASE = @GLBASE@
+
+GLOBJS = \
+       opengl/ogl_clip.o \
+       opengl/ogl_draw.o \
+       opengl/ogl_font.o \
+       opengl/ogl_rend.o \
+       opengl/ogl_rl.o \
+       opengl/ogl_sky.o \
+       opengl/ogl_tex.o \
+       opengl/m_bams.o
+
+BASEOBJS = \
+       base/i_linux.o \
+       base/i_sound.o \
+       base/am_map.o \
+       base/ct_chat.o \
+       base/d_net.o \
+       base/f_finale.o \
+       base/g_game.o \
+       base/d_main.o \
+       base/info.o \
+       base/in_lude.o \
+       base/mn_menu.o \
+       base/m_misc.o \
+       base/p_ceilng.o \
+       base/p_doors.o \
+       base/p_enemy.o \
+       base/p_floor.o \
+       base/p_inter.o \
+       base/p_lights.o \
+       base/p_map.o \
+       base/p_maputl.o \
+       base/p_mobj.o \
+       base/p_plats.o \
+       base/p_pspr.o \
+       base/p_setup.o \
+       base/p_sight.o \
+       base/p_spec.o \
+       base/p_switch.o \
+       base/p_telept.o \
+       base/p_tick.o \
+       base/p_user.o \
+       base/r_bsp.o \
+       base/r_data.o \
+       base/r_draw.o \
+       base/r_main.o \
+       base/r_plane.o \
+       base/r_segs.o \
+       base/r_things.o \
+       base/sb_bar.o \
+       base/sounds.o \
+       base/tables.o \
+       base/v_video.o \
+       base/w_wad.o \
+       base/z_zone.o
+
+all: hheretic-sdl
+
+hheretic-sdl: $(SDLOBJS) $(BASEOBJS)
+       $(CC) -o hheretic-sdl $(LDFLAGS) $(SDLOBJS) $(BASEOBJS) $(SDLLIBS)
+
+hheretic-gl: $(GLBASE) $(GLOBJS) $(BASEOBJS)
+       $(CC) -o hheretic-gl $(GLBASE) $(GLOBJS) $(BASEOBJS) $(GLLIBS) $(SDLLIBS)
+
+clean:
+       $(RM) base/*.o
+       $(RM) x11/*.o
+       $(RM) svgalib/*.o
+       $(RM) opengl/*.o
+       $(RM) sdl/*.o
+
+%.o: %.c
+       $(CC) $< -o $@ -c $(CFLAGS) 
+
+%.o: %.cpp
+       $(CXX) $< -o $@ -c $(CPPFLAGS)