updated to build and install from MSYS
git-svn-id: svn://anubis/dwscr/trunk@119 5bef9df8-b654-44bb-925b-0ff18baa8f8c
This commit is contained in:
parent
e87905c268
commit
40627ed425
@ -28,7 +28,7 @@ foreach my $fileName (@fileList)
|
|||||||
my $length = length($fileContents);
|
my $length = length($fileContents);
|
||||||
my @fileContents = split(//, $fileContents);
|
my @fileContents = split(//, $fileContents);
|
||||||
my $cname = "dat$index";
|
my $cname = "dat$index";
|
||||||
print OUTPUT "\nstatic unsigned char ${cname}[] = {\n";
|
print OUTPUT "\nstatic unsigned char ${cname} [] = {\n";
|
||||||
for (my $byteNum = 0; $byteNum <= $#fileContents; $byteNum++)
|
for (my $byteNum = 0; $byteNum <= $#fileContents; $byteNum++)
|
||||||
{
|
{
|
||||||
print OUTPUT " " if ($byteNum % 12 == 0);
|
print OUTPUT " " if ($byteNum % 12 == 0);
|
||||||
|
55
Makefile
55
Makefile
@ -5,43 +5,42 @@
|
|||||||
# set this to compile in "debug" mode
|
# set this to compile in "debug" mode
|
||||||
#DEBUG := 1
|
#DEBUG := 1
|
||||||
|
|
||||||
|
WINCHECK := $(shell which msys-1.0.dll >/dev/null 2>&1; if [ $$? -eq 0 ]; then echo MSYS; fi)
|
||||||
|
ifeq ($(strip $(WINCHECK)),)
|
||||||
|
WINDOWS := 0
|
||||||
|
else
|
||||||
|
WINDOWS := 1
|
||||||
|
endif
|
||||||
|
|
||||||
OBJS = dwscr.o wfobj/WFObj.o LoadFile/LoadFile.o ss/ss.a
|
OBJS = dwscr.o wfobj/WFObj.o LoadFile/LoadFile.o ss/ss.a
|
||||||
TARGET = dwscr
|
TARGET = dwscr
|
||||||
export CXXFLAGS := -O2 -Wall
|
export CXXFLAGS := -O2 -Wall
|
||||||
export CPPFLAGS
|
export CPPFLAGS
|
||||||
|
|
||||||
ifdef DEBUG
|
ifdef DEBUG
|
||||||
CPPFLAGS += -DDEBUG
|
CPPFLAGS += -DDEBUG
|
||||||
CPPFLAGS += -g
|
CPPFLAGS += -g
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(WINDOWS),1)
|
||||||
|
LDFLAGS += -lopengl32 -lglu32 -lmingw32
|
||||||
|
TARGET := $(TARGET).exe
|
||||||
|
SSNAME := dwscr.scr
|
||||||
|
INSTALLDIR := C:\WINDOWS
|
||||||
|
OBJS += displayinfo-win32.o
|
||||||
|
else
|
||||||
|
LDFLAGS += -lGL -lGLU
|
||||||
|
OBJS += displayinfo.o
|
||||||
|
endif
|
||||||
|
|
||||||
|
LDFLAGS += $(shell sdl-config --libs)
|
||||||
|
export CPPFLAGS += $(shell sdl-config --cflags)
|
||||||
|
|
||||||
ifdef WITHOUT_ODE
|
ifdef WITHOUT_ODE
|
||||||
CPPFLAGS += -DWITHOUT_ODE
|
CPPFLAGS += -DWITHOUT_ODE
|
||||||
endif
|
|
||||||
ifdef WIN32
|
|
||||||
export CP := copy
|
|
||||||
export MV := rename
|
|
||||||
export CC := mingw32-gcc
|
|
||||||
export CXX := mingw32-g++
|
|
||||||
export CPPFLAGS += $(shell sdl-config --cflags)
|
|
||||||
ifndef WITHOUT_ODE
|
|
||||||
export CPPFLAGS += $(shell ode-config --cflags)
|
|
||||||
endif
|
|
||||||
LDFLAGS += -lopengl32 -lglu32 -lmingw32 $(shell sdl-config --libs)
|
|
||||||
ifndef WITHOUT_ODE
|
|
||||||
LDFLAGS += $(shell ode-config --libs)
|
|
||||||
endif
|
|
||||||
TARGET := $(TARGET).exe
|
|
||||||
SSNAME := dwscr.scr
|
|
||||||
INSTALLDIR := C:\WINDOWS
|
|
||||||
OBJS += displayinfo-win32.o
|
|
||||||
else
|
else
|
||||||
export CP := cp
|
CPPFLAGS += $(shell ode-config --cflags)
|
||||||
export MV := mv
|
LDFLAGS += $(shell ode-config --libs)
|
||||||
export CC := gcc
|
|
||||||
export CXX := g++
|
|
||||||
export AR := ar
|
|
||||||
export CPPFLAGS += `sdl-config --cflags` `ode-config --cflags`
|
|
||||||
LDFLAGS += `sdl-config --libs` `ode-config --libs` -lGL -lGLU
|
|
||||||
OBJS += displayinfo.o
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
@ -62,10 +61,10 @@ LoadFile/LoadFile.o:
|
|||||||
ss/ss.a:
|
ss/ss.a:
|
||||||
$(MAKE) -C ss
|
$(MAKE) -C ss
|
||||||
|
|
||||||
ifdef WIN32
|
ifeq ($(WINDOWS),1)
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install:
|
install:
|
||||||
$(CP) $(TARGET) $(INSTALLDIR)\$(SSNAME)
|
cp $(TARGET) $(INSTALLDIR)\$(SSNAME)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
@ -1 +0,0 @@
|
|||||||
mingw32-make WIN32=1 %*
|
|
Loading…
x
Reference in New Issue
Block a user