summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2021-01-25 15:56:45 +0000
committerJuan J. Martinez <jjm@usebox.net>2021-01-25 15:56:45 +0000
commit6b884b930a9e1b7016f4e1a8967466cb9536ce45 (patch)
tree7af0506cbd95b5000b577030f53f9575fdf05937
parent71124479ed9f7e88f7b11f3ad4175000e2f21c4e (diff)
downloadubox-msx-lib-6b884b930a9e1b7016f4e1a8967466cb9536ce45.tar.gz
ubox-msx-lib-6b884b930a9e1b7016f4e1a8967466cb9536ce45.zip
Better compatibility with Windows
-rw-r--r--Makefile2
-rw-r--r--tools/rasm/Makefile10
2 files changed, 8 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index c93b3a6..0eb056f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
all: libs
-export PATH := $(shell realpath ./bin):$(PATH)
+export PATH := $(PWD)/bin:$(PATH)
libs: lib ubox spman mplayer ap
diff --git a/tools/rasm/Makefile b/tools/rasm/Makefile
index 8e7e71b..8f0c708 100644
--- a/tools/rasm/Makefile
+++ b/tools/rasm/Makefile
@@ -1,13 +1,17 @@
all: rasm
+CC := gcc
+
ifdef ($(OS),Windows_NT)
- TARGET = rasm.exe
+ TARGET := rasm.exe
+ LDFLAGS := -lrtm
else
- TARGET = rasm
+ TARGET := rasm
+ LDFLAGS := -lm -lrt
endif
rasm: rasm_v0120.c
- $(CC) $< -s -O2 -lm -lrt -march=native -o $@
+ $(CC) $< -s -O2 $(LDFLAGS) -march=native -o $@
cp $(TARGET) ../../bin
rm -f $(TARGET)