mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-09 19:03:29 +00:00
watcom
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@249 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -106,6 +106,7 @@ endif
|
|||||||
ifeq ($(WINDOWS),1)
|
ifeq ($(WINDOWS),1)
|
||||||
L_CFLAGS += -DUSE_GDI
|
L_CFLAGS += -DUSE_GDI
|
||||||
L_LDFLAGS += -Wl,--out-implib,src/libMw.a -static-libgcc
|
L_LDFLAGS += -Wl,--out-implib,src/libMw.a -static-libgcc
|
||||||
|
OOL_LDFLAGS += -Wl,--out-implib,oosrc/libMwOO.a -static-libgcc
|
||||||
L_OBJS += src/backend/gdi.o
|
L_OBJS += src/backend/gdi.o
|
||||||
L_LIBS += -lgdi32
|
L_LIBS += -lgdi32
|
||||||
|
|
||||||
@@ -183,4 +184,4 @@ examples/%.o: examples/%.c
|
|||||||
$(CC) $(E_CFLAGS) -c -o $@ $<
|
$(CC) $(E_CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f */*.dll */*.so */*.a */*.o */*/*.o external/*/src/*.o examples/*.exe $(EXAMPLES) examples/opengl examples/vulkan
|
rm -f */*.dll */*.so */*.lib */*.a */*.o */*/*.o external/*/src/*.o examples/*.exe $(EXAMPLES) examples/opengl examples/vulkan
|
||||||
|
|||||||
@@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include <GL/gl.h>
|
|
||||||
|
|
||||||
MwWidget window, opengl, ldate, ltime;
|
MwWidget window, opengl, ldate, ltime;
|
||||||
time_t last = 0;
|
time_t last = 0;
|
||||||
struct tm* tm;
|
struct tm* tm;
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
* %param name Property name
|
* %param name Property name
|
||||||
*/
|
*/
|
||||||
#define MwDispatch3(x, y, name) \
|
#define MwDispatch3(x, y, name) \
|
||||||
((x->widget_class != NULL && x->widget_class->y != NULL) ? x->widget_class->y(x, name) : 0)
|
if(x->widget_class != NULL && x->widget_class->y != NULL) x->widget_class->y(x, name)
|
||||||
|
|
||||||
#define MwWaitMS 5
|
#define MwWaitMS 5
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,17 @@
|
|||||||
#include <Mw/MachDep.h>
|
#include <Mw/MachDep.h>
|
||||||
#include <Mw/TypeDefs.h>
|
#include <Mw/TypeDefs.h>
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#else
|
||||||
|
#include <GL/glx.h>
|
||||||
|
#endif
|
||||||
|
#include <GL/gl.h>
|
||||||
|
|
||||||
|
#ifndef GLAPIENTRY
|
||||||
|
#define GLAPIENTRY APIENTRY
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -2,13 +2,6 @@
|
|||||||
#include <Mw/Milsko.h>
|
#include <Mw/Milsko.h>
|
||||||
#include <Mw/Widget/OpenGL.h>
|
#include <Mw/Widget/OpenGL.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
/* nothing */
|
|
||||||
#else
|
|
||||||
#include <GL/glx.h>
|
|
||||||
#endif
|
|
||||||
#include <GL/gl.h>
|
|
||||||
|
|
||||||
typedef void(GLAPIENTRY* MWglColor3f)(GLfloat red, GLfloat green, GLfloat blue);
|
typedef void(GLAPIENTRY* MWglColor3f)(GLfloat red, GLfloat green, GLfloat blue);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
typedef HGLRC(WINAPI* MWwglCreateContext)(HDC);
|
typedef HGLRC(WINAPI* MWwglCreateContext)(HDC);
|
||||||
|
|||||||
35
tools/watcom.pl
Executable file
35
tools/watcom.pl
Executable file
@@ -0,0 +1,35 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
|
# $Id$
|
||||||
|
|
||||||
|
my $target = "nt";
|
||||||
|
my @cmd = ();
|
||||||
|
push(@cmd, "-I$ENV{WATCOM}/h");
|
||||||
|
push(@cmd, "-I$ENV{WATCOM}/h/nt");
|
||||||
|
push(@cmd, "-DSTBI_NO_SIMD");
|
||||||
|
foreach my $f (@ARGV){
|
||||||
|
if($f eq "-static-libgcc"){
|
||||||
|
next;
|
||||||
|
}elsif($f =~ /^-Wl,--out-implib,(.+)$/){
|
||||||
|
push(@cmd, "-Wl,option implib=$1");
|
||||||
|
next;
|
||||||
|
}elsif($f =~ /^-W.+$/){
|
||||||
|
next;
|
||||||
|
}elsif($f =~ /^-L(.+)$/){
|
||||||
|
push(@cmd, "-Wl,libpath $1");
|
||||||
|
next;
|
||||||
|
}elsif($f eq "-lMw"){
|
||||||
|
push(@cmd, "-lMw");
|
||||||
|
next;
|
||||||
|
}elsif($f =~ /^-l(.+)$/){
|
||||||
|
push(@cmd, "$1.lib");
|
||||||
|
next;
|
||||||
|
}elsif($f =~ /^(?:oo)?src\//){
|
||||||
|
$target = "nt_dll";
|
||||||
|
}
|
||||||
|
push(@cmd, $f);
|
||||||
|
}
|
||||||
|
|
||||||
|
unshift(@cmd, "-b$target");
|
||||||
|
|
||||||
|
print("Running: owcc " . join(" ", @cmd) . "\n");
|
||||||
|
exec("owcc", @cmd);
|
||||||
Reference in New Issue
Block a user