Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit ce193793 authored by deuce's avatar deuce

Some mingw cross-compile support use something like:

gmake DONT_CLOBBER_CC=yes CC=mingw32-gcc
parent 6721eb0f
......@@ -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
......
......@@ -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!
......
......@@ -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
......
......@@ -119,18 +119,26 @@ else
endif
INSTALL_DATA ?= install -m 0444
ifneq ($(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
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment