Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
ce193793
Commit
ce193793
authored
Aug 16, 2013
by
deuce
Browse files
Some mingw cross-compile support use something like:
gmake DONT_CLOBBER_CC=yes CC=mingw32-gcc
parent
6721eb0f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
31 deletions
+56
-31
src/build/Common.gmake
src/build/Common.gmake
+14
-6
src/conio/Common.gmake
src/conio/Common.gmake
+24
-19
src/conio/GNUmakefile
src/conio/GNUmakefile
+3
-1
src/syncterm/GNUmakefile
src/syncterm/GNUmakefile
+12
-4
src/xpdev/GNUmakefile
src/xpdev/GNUmakefile
+3
-1
No files found.
src/build/Common.gmake
View file @
ce193793
...
...
@@ -191,6 +191,11 @@ else
endif
BUILDPATH ?= $(BUILD)
gcc_machine := $(shell ${CC} -dumpmachine)
ifeq ($(gcc_machine),mingw32)
os := Win32
endif
# Get OS
ifndef os
os := $(shell uname)
...
...
@@ -281,9 +286,7 @@ else
endif
# OS Specific Flags
ifeq ($(os),sunos) # Solaris
CFLAGS += -D__solaris__ -DNEEDS_DAEMON -DNEEDS_FORKPTY -DNEEDS_CFMAKERAW
# Solaris 10 provides setenv()
ifeq ($(os),sunos) # Solaris CFLAGS += -D__solaris__ -DNEEDS_DAEMON -DNEEDS_FORKPTY -DNEEDS_CFMAKERAW # Solaris 10 provides setenv()
ifeq ($(shell if [ `uname -r | sed 's/\.//'` -lt 510 ] ; then echo "Yes" ; else echo "No" ; fi),Yes)
CFLAGS += -DNEEDS_SETENV
endif
...
...
@@ -336,9 +339,14 @@ else
MT_CFLAGS += -DUSE_XP_SEMAPHORES
# This makes ctime_r() be the correct one.
#CFLAGS += -D_POSIX_PTHREAD_SEMANTICS
else # Linux / Other UNIX
XP_SEM := 1
MT_CFLAGS += -DUSE_XP_SEMAPHORES
else
ifeq ($(os),win32) # Windows
CFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0500 -DWINVER=0x0500 -D_WIN32_IE=0x0500
MT_CFLAGS += -D_WIN32
else # Linux / Other UNIX
XP_SEM := 1
MT_CFLAGS += -DUSE_XP_SEMAPHORES
endif
endif
endif
endif
...
...
src/conio/Common.gmake
View file @
ce193793
...
...
@@ -21,31 +21,36 @@ ifeq ($(os),openbsd)
CFLAGS += -DHAVE_VASPRINTF
endif
ifdef USE_SYSTEM_CURSES
CIOLIB-MT_LIBS += $(UL_PRE)curses$(UL_SUF)
else
CIOLIB-MT_LIBS += $(UL_PRE)ncurses$(UL_SUF)
endif
ifndef NO_X
ifdef STATIC
CIOLIB-MT_LIBS += -L$(X_PATH)$(DIRSEP)lib -lX11
ifneq ($(os),win32)
ifdef USE_SYSTEM_CURSES
CIOLIB-MT_LIBS += $(UL_PRE)curses$(UL_SUF)
else
ifeq ($(os),darwin)
ifeq ($(shell uname -r),6.8)
CIOLIB-MT_LIBS += $(UL_PRE)ncurses$(UL_SUF)
endif
ifndef NO_X
ifdef STATIC
CIOLIB-MT_LIBS += -L$(X_PATH)$(DIRSEP)lib -lX11
else
ifeq ($(os),darwin)
ifeq ($(shell uname -r),6.8)
CIOLIB-MT_LIBS += $(UL_PRE)dl$(UL_SUF)
endif
endif
ifeq ($(os),linux)
CIOLIB-MT_LIBS += $(UL_PRE)dl$(UL_SUF)
endif
ifeq ($(os),sunos)
CIOLIB-MT_LIBS += $(UL_PRE)dl$(UL_SUF)
endif
endif
ifeq ($(os),linux)
CIOLIB-MT_LIBS += $(UL_PRE)dl$(UL_SUF)
endif
ifeq ($(os),sunos)
CIOLIB-MT_LIBS += $(UL_PRE)dl$(UL_SUF)
endif
else
ifeq ($(os),darwin)
CIOLIB-MT_CFLAGS += -DDISABLE_X11=1
endif
endif
else
ifeq ($(os),darwin)
CIOLIB-MT_CFLAGS += -DDISABLE_X11=1
endif
NO_X := 1
CIOLIB-MT_CFLAGS += -DDISABLE_X11=1
endif
# Find SDL headers!
...
...
src/conio/GNUmakefile
View file @
ce193793
...
...
@@ -4,7 +4,9 @@ include $(SRC_ROOT)/build/Common.gmake # defines clean and output directory rule
CFLAGS
+=
$
(
XPDEV-MT_CFLAGS
)
$
(
CIOLIB-MT_CFLAGS
)
OBJS
+=
$(MTOBJODIR)$(DIRSEP)
curs_cio
$(OFILE)
ifneq
($(os),win32)
OBJS
+=
$(MTOBJODIR)$(DIRSEP)
curs_cio
$(OFILE)
endif
ifdef
NO_X
CFLAGS
+=
-DNO_X
else
...
...
src/syncterm/GNUmakefile
View file @
ce193793
...
...
@@ -119,18 +119,26 @@ else
endif
INSTALL_DATA
?=
install
-m
0444
if
n
eq
($(os),
haiku
)
OBJS
+=
$(MTOBJODIR)$(DIRSEP)
comio_
nix
$(OFILE)
\
ifeq
($(os),
win32
)
OBJS
+=
$(MTOBJODIR)$(DIRSEP)
comio_
win32
$(OFILE)
\
$(MTOBJODIR)$(DIRSEP)
modem
$(OFILE)
\
$(MTOBJODIR)$(DIRSEP)
comio
$(OFILE)
else
ifneq
($(os),haiku)
OBJS
+=
$(MTOBJODIR)$(DIRSEP)
comio_nix
$(OFILE)
\
$(MTOBJODIR)$(DIRSEP)
modem
$(OFILE)
\
$(MTOBJODIR)$(DIRSEP)
comio
$(OFILE)
endif
endif
OBJS
+=
$(MTOBJODIR)$(DIRSEP)
conn_pty
$(OFILE)
ifndef
bcc
ifneq
($(os),sunos)
ifneq
($(os),darwin)
ifneq
($(os),haiku)
ifneq
($(os),haiku)
ifneq
($(os),win32)
EXTRA_LIBS
+=
-lutil
endif
endif
endif
endif
endif
endif
...
...
src/xpdev/GNUmakefile
View file @
ce193793
...
...
@@ -4,7 +4,9 @@ include $(SRC_ROOT)/build/Common.gmake
ifdef
XP_SEM
MTOBJS
+=
$(MTOBJODIR)$(DIRSEP)
xpsem
$(OFILE)
endif
MTOBJS
+=
$(MTOBJODIR)$(DIRSEP)
xpevent
$(OFILE)
ifneq
($(os),win32)
MTOBJS
+=
$(MTOBJODIR)$(DIRSEP)
xpevent
$(OFILE)
endif
CFLAGS
+=
-DSOUNDCARD_H_IN
=
$(
shell
if
[
-f
/usr/include/sys/soundcard.h
]
;
then
echo
1
;
elif
[
-f
/usr/include/soundcard.h
]
;
then
echo
2
;
elif
[
-f
/usr/include/linux/soundcard.h
]
;
then
echo
3
;
else
echo
0
;
fi
)
-I
.
$(XPDEV_CFLAGS)
ifeq
($(shell if [ -f /usr/include/alsa/asoundlib.h ] ; then echo YES ; fi),YES)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment