aboutsummaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/makefile9
-rw-r--r--shared/os.mk12
2 files changed, 12 insertions, 9 deletions
diff --git a/shared/makefile b/shared/makefile
index 7f0ceb9..e5a6ff6 100644
--- a/shared/makefile
+++ b/shared/makefile
@@ -5,14 +5,5 @@ HEADERS += $(wildcard ../shared/*.h)
BUILD_STR=$(shell git update-index -q --refresh; git describe --tags --dirty='*' --broken='x' | cut -c1-20)
CFLAGS += -DW2_BUILD_STR=\"$(BUILD_STR)\"
-# os info
-OS=$(strip $(shell uname -o))
-ifeq ($(OS),GNU/Linux)
-CFLAGS += -DW2_HOST_LINUX
-endif
-ifeq ($(OS),Msys)
-CFLAGS += -DW2_HOST_WIN32
-endif
-
clean::
rm -f ../shared/*.o
diff --git a/shared/os.mk b/shared/os.mk
new file mode 100644
index 0000000..e4ede42
--- /dev/null
+++ b/shared/os.mk
@@ -0,0 +1,12 @@
+# os info
+OS=$(strip $(shell uname -o))
+ifeq ($(OS),GNU/Linux)
+CFLAGS += -DW2_HOST_LINUX
+LINUX := true
+TARGET := a.out
+endif
+ifeq ($(OS),Msys)
+CFLAGS += -DW2_HOST_WIN32
+WIN32 := true
+TARGET := a.exe
+endif \ No newline at end of file