aboutsummaryrefslogtreecommitdiff
path: root/win32/amd64/Makefile
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/amd64/Makefile
parentfc1ea6ee5b5135e70e1a0e9b2737f6189b740691 (diff)
refactor Makefile and add msvc
Diffstat (limited to 'win32/amd64/Makefile')
-rw-r--r--win32/amd64/Makefile26
1 files changed, 6 insertions, 20 deletions
diff --git a/win32/amd64/Makefile b/win32/amd64/Makefile
index d25dd7e..5769d7b 100644
--- a/win32/amd64/Makefile
+++ b/win32/amd64/Makefile
@@ -3,35 +3,21 @@ vpath %.c ../../fmdriver
vpath %.c ../../libopna
vpath %.c ../../fmdsp
vpath %.rc ..
-TARGET=fmplayer.exe
-ICON=../fmplayer.ico
-ICONFILES=../fmplayer.png ../fmplayer32.png
-FMDRIVER_OBJS=fmdriver_fmp.o \
- ppz8.o
-LIBOPNA_OBJS=opna.o \
- opnatimer.o \
- opnafm.o \
- opnassg.o \
- opnadrum.o \
- opnaadpcm.o
-FMDSP_OBJS=fmdsp.o font_rom.o
-OBJS=main.o dsoundout.o soundout.o waveout.o uc.o lnf.o winfont.o \
- $(FMDRIVER_OBJS) \
- $(LIBOPNA_OBJS) \
- $(FMDSP_OBJS)
+
+include ../fmplayer.mak
+
+OBJS=$(addsuffix .o,$(OBJBASE) uc $(RESBASE))
ARCH=x86_64
PREFIX=$(ARCH)-w64-mingw32-
CC=$(PREFIX)gcc
WINDRES=$(PREFIX)windres
STRIP=$(PREFIX)strip
CFLAGS=-std=c99 -Os -Wall -Wextra -pedantic -I../.. \
- -DUNICODE -D_UNICODE \
- -DWINVER=0x0500 -D_WIN32_WINNT=0x0500
+ $(addprefix -D,$(DEFINES))
LIBS=-nostdlib -s -Wl,-eentry \
-Wl,--subsystem,windows \
-lgcc -lntdll \
- -luser32 -lkernel32 -lole32 -ldxguid -luuid -lcomdlg32 \
- -lgdi32 -lshlwapi -lwinmm -lshell32
+ $(addprefix -l,$(LIBBASE))
$(TARGET): $(OBJS)
@echo " CCLD $@"