diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..480e6e1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +**.o +.vscode \ No newline at end of file diff --git a/Makefile b/Makefile index af4b2e5..8d3d267 100644 --- a/Makefile +++ b/Makefile @@ -4,14 +4,18 @@ # # $Log:$ # -CC= gcc # gcc or g++ +CC= gcc # gcc or g++ -CFLAGS=-m32 -g -Wall -DNORMALUNIX -DLINUX -DSDL # -DUSEASM -LDFLAGS=-L/usr/lib/i386-linux-gnu/ -LIBS=-lSDL #-lnsl -lm +LIBS= -L/opt/homebrew/opt/sdl12-compat/lib \ + -lSDL + +INCLUDES=-I/opt/homebrew/opt/sdl12-compat/include \ + -I/usr/local/include + +CFLAGS=-m32 -g -c -w -DSDL # subdirectory for objects -O=linux +O=macos # not too sophisticated dependency OBJS= \ @@ -81,14 +85,14 @@ all: $(O)/sdl_doom clean: rm -f *.o *~ *.flc - rm -f linux/* + rm -f $(O)/* $(O)/sdl_doom: $(OBJS) $(O)/i_main.o - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(O)/i_main.o \ - -o $(O)/sdl_doom $(LIBS) + $(CC) $(CFLAGS) $(OBJS) $(O)/i_main.o \ + -o $(O)/sdl_doom $(LIBS) $(INCLUDES) $(O)/%.o: %.c - $(CC) $(CFLAGS) -c $< -o $@ + $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ ############################################################# # diff --git a/d_main.c b/d_main.c index db980b7..8648539 100644 --- a/d_main.c +++ b/d_main.c @@ -40,6 +40,11 @@ static const char rcsid[] = "$Id: d_main.c,v 1.8 1997/02/03 22:45:09 b1 Exp $"; #include #endif +#ifdef __APPLE__ +#include +#include +#include +#endif #include "doomdef.h" #include "doomstat.h" diff --git a/i_sound.c b/i_sound.c index e390046..7727ba4 100644 --- a/i_sound.c +++ b/i_sound.c @@ -43,7 +43,9 @@ rcsid[] = "$Id: i_unix.c,v 1.5 1997/02/03 22:45:10 b1 Exp $"; #include // Linux voxware output. +#ifdef LINUX #include +#endif // Timer stuff. Experimental. #include diff --git a/m_bbox.c b/m_bbox.c index 2b6abab..68a2fdf 100644 --- a/m_bbox.c +++ b/m_bbox.c @@ -31,11 +31,9 @@ rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $"; #ifdef __GNUG__ #pragma implementation "m_bbox.h" #endif +#include "doomtype.h" #include "m_bbox.h" - - - void M_ClearBox (fixed_t *box) { box[BOXTOP] = box[BOXRIGHT] = MININT; diff --git a/m_bbox.h b/m_bbox.h index 66be2fb..a5f8fa1 100644 --- a/m_bbox.h +++ b/m_bbox.h @@ -23,7 +23,9 @@ #ifndef __M_BBOX__ #define __M_BBOX__ +#ifdef LINUX #include +#endif #include "m_fixed.h" diff --git a/m_misc.c b/m_misc.c index 0df4fe5..4d941fc 100644 --- a/m_misc.c +++ b/m_misc.c @@ -32,7 +32,7 @@ rcsid[] = "$Id: m_misc.c,v 1.6 1997/02/03 22:45:10 b1 Exp $"; #include #include #include - +#include "d_englsh.h" #include diff --git a/r_data.c b/r_data.c index acabd53..a8df652 100644 --- a/r_data.c +++ b/r_data.c @@ -45,6 +45,9 @@ rcsid[] = "$Id: r_data.c,v 1.4 1997/02/03 16:47:55 b1 Exp $"; #include #endif +#ifdef __APPLE__ +#include +#endif #include "r_data.h" diff --git a/w_wad.c b/w_wad.c index 178f5cb..75cc146 100644 --- a/w_wad.c +++ b/w_wad.c @@ -38,6 +38,17 @@ rcsid[] = "$Id: w_wad.c,v 1.5 1997/02/03 16:47:57 b1 Exp $"; #define O_BINARY 0 #endif +#ifdef __APPLE__ +#include +#include +#include +#include +#include +#include +#include +#define O_BINARY 0 +#endif + #include "doomtype.h" #include "m_swap.h" #include "i_system.h"