added support for Cygwin. Closes #8
This commit is contained in:
parent
a19c7531b2
commit
523c28a215
@ -28,6 +28,10 @@ ifeq ($(platform),)
|
|||||||
override platform := freebsd
|
override platform := freebsd
|
||||||
override architecture := $(__uname_m)
|
override architecture := $(__uname_m)
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(findstring cygwin,$(__uname_s)),cygwin)
|
||||||
|
override platform := cygwin
|
||||||
|
override architecture := $(__uname_m)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(architecture),)
|
ifeq ($(architecture),)
|
||||||
override architecture := unknown-architecture
|
override architecture := unknown-architecture
|
||||||
@ -56,6 +60,11 @@ ifeq ($(platform),freebsd)
|
|||||||
CFLAGS += -fpic
|
CFLAGS += -fpic
|
||||||
CXXFLAGS += -fpic
|
CXXFLAGS += -fpic
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(platform),cygwin)
|
||||||
|
LDFLAGS += -ldl
|
||||||
|
CFLAGS += -D_XOPEN_SOURCE=500 -fpic
|
||||||
|
CXXFLAGS += -fpic
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(platform),mac)
|
ifeq ($(platform),mac)
|
||||||
libsuffix := .dylib
|
libsuffix := .dylib
|
||||||
@ -69,6 +78,9 @@ endif
|
|||||||
ifeq ($(platform),freebsd)
|
ifeq ($(platform),freebsd)
|
||||||
libsuffix := .so
|
libsuffix := .so
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(platform),cygwin)
|
||||||
|
libsuffix := .dll
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: build-executable
|
.PHONY: build-executable
|
||||||
build: build-executable
|
build: build-executable
|
||||||
|
@ -158,7 +158,7 @@ int WAI_PREFIX(getModulePath)(char* out, int capacity, int* dirname_length)
|
|||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__) || defined(__CYGWIN__)
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user