From e5eeed688eac1dec281fe33cf0ef6e669a670c8a Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 14 Mar 2018 23:48:29 +0100 Subject: [PATCH] Add some stuff to net sample Makefile --- libretro-common/samples/net/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/libretro-common/samples/net/Makefile b/libretro-common/samples/net/Makefile index 9ef1c569ed..c386adda5d 100644 --- a/libretro-common/samples/net/Makefile +++ b/libretro-common/samples/net/Makefile @@ -4,6 +4,21 @@ LIBRETRO_COMM_DIR := ../.. INCFLAGS = -I$(LIBRETRO_COMM_DIR)/include +ifeq ($(platform),) +platform = unix +ifeq ($(shell uname -a),) + platform = win +else ifneq ($(findstring Darwin,$(shell uname -a)),) + platform = osx + arch = intel +ifeq ($(shell uname -p),powerpc) + arch = ppc +endif +else ifneq ($(findstring MINGW,$(shell uname -a)),) + platform = win +endif +endif + ifeq ($(DEBUG),1) CFLAGS += -O0 -g else @@ -25,6 +40,10 @@ NET_IFINFO_C = \ $(LIBRETRO_COMM_DIR)/net/net_ifinfo.c \ net_ifinfo_test.c +ifeq ($(platform), win) +CFLAGS += -lwsock2_w32 +endif + NET_IFINFO_OBJS := $(NET_IFINFO_C:.c=.o) .PHONY: all clean