aboutsummaryrefslogtreecommitdiff
path: root/win32/msvc/GNUmakefile
diff options
context:
space:
mode:
authorTakamichi Horikawa <takamichiho@gmail.com>2017-01-26 22:10:24 +0900
committerTakamichi Horikawa <takamichiho@gmail.com>2017-01-26 22:10:24 +0900
commit92ac7de6585e64006db631d6c39d4a7ef00f4776 (patch)
tree9bb2bec4a042a0c18364d9f6f292480e77a6f443 /win32/msvc/GNUmakefile
parentfc1ea6ee5b5135e70e1a0e9b2737f6189b740691 (diff)
refactor Makefile and add msvc
Diffstat (limited to 'win32/msvc/GNUmakefile')
-rw-r--r--win32/msvc/GNUmakefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/win32/msvc/GNUmakefile b/win32/msvc/GNUmakefile
new file mode 100644
index 0000000..734326c
--- /dev/null
+++ b/win32/msvc/GNUmakefile
@@ -0,0 +1,30 @@
+vpath %.c ../
+vpath %.c ../../fmdriver
+vpath %.c ../../libopna
+vpath %.c ../../fmdsp
+vpath %.rc ..
+
+include ../fmplayer.mak
+
+OBJS=$(addsuffix .obj,$(OBJBASE)) $(addsuffix .res,$(RESBASE))
+CC=cl /nologo
+RC=rc /nologo
+CFLAGS=/W2 /Os /Oi /MT /I..\.. \
+ $(addprefix /D,$(DEFINES))
+LIBS=$(addsuffix .lib,$(LIBBASE)) \
+ /link /SUBSYSTEM:WINDOWS
+
+$(TARGET): $(OBJS)
+ @echo CCLD $@
+ @$(CC) $(LDFLAGS) /Fe$@ $(OBJS) $(LIBS)
+
+%.obj: %.c
+ @echo CC $@
+ @$(CC) $(CFLAGS) /c $< /Fo$@
+
+%.res: %.rc $(ICON)
+ @echo RC $@
+ @$(RC) /fo$@ $<
+
+clean:
+ -del $(TARGET) $(OBJS)