hello

with GNU make, maybe this can help you (detection of OS + exemple) :

osname := $(shell uname)
OS :=$(osname)
OS := $(OS:Linux=Unix)
# FreeBSD, OpenBSD, NetBSD, MidnightBSD
OS := $(OS:%BSD=Unix)
OS := $(OS:DragonFlyD=Unix)
OS := $(OS:SunOS=Unix)
OS := $(OS:MINGW%=Windows)
OS := $(OS:MSYS%=Windows)
OS := $(OS:Windows_NT=Windows)
OS := $(OS:Darwin=MACOS)

PCFLAGS := -I. -ffunction-sections -fdata-sections
PLDFLAGS :=

ifeq ($(OS),MACOS)
  PLDFLAGS += -Wl,-dead_strip -framework AppKit.framework -framework
CoreFoundation.framework
else
  PLDFLAGS += -Wl,--gc-sections
endif


hth

regards

Vincent Torri


_______________________________________________
Msys2-users mailing list
Msys2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to