projects
/
dosdemo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e23b27a
)
Fixes for compiling under msys2
author
Michael Georgoulopoulos
<mgeorgoulopoulos@gmail.com>
Sun, 8 May 2022 18:37:03 +0000
(21:37 +0300)
committer
Michael Georgoulopoulos
<mgeorgoulopoulos@gmail.com>
Sun, 8 May 2022 18:37:03 +0000
(21:37 +0300)
GNUmakefile
patch
|
blob
|
history
src/bsptree.c
patch
|
blob
|
history
src/glut/audio.c
patch
|
blob
|
history
src/treestor.c
patch
|
blob
|
history
tools/csprite/src/main.c
patch
|
blob
|
history
tools/img2bin/Makefile
patch
|
blob
|
history
diff --git
a/GNUmakefile
b/GNUmakefile
index
ee7a35e
..
834db7b
100644
(file)
--- a/
GNUmakefile
+++ b/
GNUmakefile
@@
-27,7
+27,7
@@
endif
sys ?= $(shell uname -s | sed 's/MINGW.*/mingw/; s/IRIX.*/IRIX/')
ifeq ($(sys), mingw)
sys ?= $(shell uname -s | sed 's/MINGW.*/mingw/; s/IRIX.*/IRIX/')
ifeq ($(sys), mingw)
- obj = $(src:.c=.w32.o)
+ obj = $(src:.c=.w32.o) $(asmsrc:.asm=.w32.o)
bin = demo_win32.exe
bin = demo_win32.exe
diff --git
a/src/bsptree.c
b/src/bsptree.c
index
7db5711
..
d6417b9
100644
(file)
--- a/
src/bsptree.c
+++ b/
src/bsptree.c
@@
-6,8
+6,12
@@
#if defined(__WATCOMC__) || defined(_MSC_VER) || defined(__DJGPP__)
#include <malloc.h>
#else
#if defined(__WATCOMC__) || defined(_MSC_VER) || defined(__DJGPP__)
#include <malloc.h>
#else
+#ifdef WIN32
+#include <malloc.h>
+#else
#include <alloca.h>
#endif
#include <alloca.h>
#endif
+#endif
#include "bsptree.h"
#include "dynarr.h"
#include "inttypes.h"
#include "bsptree.h"
#include "dynarr.h"
#include "inttypes.h"
diff --git
a/src/glut/audio.c
b/src/glut/audio.c
index
c776d3b
..
a7ea50c
100644
(file)
--- a/
src/glut/audio.c
+++ b/
src/glut/audio.c
@@
-63,7
+63,7
@@
int au_init(void)
{
#ifdef _WIN32
HANDLE thr;
{
#ifdef _WIN32
HANDLE thr;
- if((thr = CreateThread(0, 0, update, 0, 0, 0))) {
+ if((thr = CreateThread(0, 0, upd_thread, 0, 0, 0))) {
CloseHandle(thr);
}
#else
CloseHandle(thr);
}
#else
@@
-169,7
+169,7
@@
void au_update(void)
}
#ifdef _WIN32
}
#ifdef _WIN32
-static DWORD WINAPI upd_thread(void *cls);
+static DWORD WINAPI upd_thread(void *cls)
#else
static void *update(void *cls)
#endif
#else
static void *update(void *cls)
#endif
diff --git
a/src/treestor.c
b/src/treestor.c
index
91adfec
..
69853c8
100644
(file)
--- a/
src/treestor.c
+++ b/
src/treestor.c
@@
-4,7
+4,7
@@
#include <errno.h>
#include "treestor.h"
#include <errno.h>
#include "treestor.h"
-#if defined(__WATCOMC__) || defined(_MSC_VER) || defined(__DJGPP__)
+#if defined(__WATCOMC__) || defined(WIN32) || defined(__DJGPP__)
#include <malloc.h>
#else
#include <alloca.h>
#include <malloc.h>
#else
#include <alloca.h>
diff --git
a/tools/csprite/src/main.c
b/tools/csprite/src/main.c
index
a59aa3e
..
c549b3e
100644
(file)
--- a/
tools/csprite/src/main.c
+++ b/
tools/csprite/src/main.c
@@
-3,7
+3,11
@@
#include <string.h>
#include <stdint.h>
#include <assert.h>
#include <string.h>
#include <stdint.h>
#include <assert.h>
+#ifdef WIN32
+#include <malloc.h>
+#else
#include <alloca.h>
#include <alloca.h>
+#endif
#include "image.h"
struct rect {
#include "image.h"
struct rect {
diff --git
a/tools/img2bin/Makefile
b/tools/img2bin/Makefile
index
b6e9f4e
..
5e525cb
100644
(file)
--- a/
tools/img2bin/Makefile
+++ b/
tools/img2bin/Makefile
@@
-4,7
+4,7
@@
bin = img2bin
root = ../..
CFLAGS = -pedantic -Wall -g -I$(root)/libs/imago/src
root = ../..
CFLAGS = -pedantic -Wall -g -I$(root)/libs/imago/src
-LDFLAGS = -L$(root)/libs/imago -limago -lm
+LDFLAGS = -L$(root)/libs/imago -limago -lpng -ljpeg -lz -L/usr/local/lib -lm
$(bin): $(obj)
$(CC) -o $@ $(obj) $(LDFLAGS)
$(bin): $(obj)
$(CC) -o $@ $(obj) $(LDFLAGS)