-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
49 lines (38 loc) · 1.02 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Makefile for ivbconv
#
# Author: Adrian Matoga
#
# Poetic License:
#
# This work 'as-is' we provide.
# No warranty express or implied.
# We've done our best,
# to debug and test.
# Liability for damages denied.
#
# Permission is granted hereby,
# to copy, share, and modify.
# Use as is fit,
# free or for profit.
# These rights, on this notice, rely.
DMD := dmd
src := dos.d flashpack.d freeimage.d ivbconv.d outputformat.d vbxe.d
BUILD_OS := $(if $(WINDIR),windows,$(shell uname -s | tr A-Z a-z))
exesuf := $(if $(filter $(BUILD_OS),windows),.exe,)
ldflags := $(if $(filter $(BUILD_OS),windows),FreeImage.lib,-L-lfreeimage)
progname := ivbconv$(exesuf)
dflags := -release
#dflags := -g
all: $(progname) README.html
.PHONY: all
$(progname): $(src) ivb2.obx vb.obx ivb216.obx vb16.obx
$(DMD) $(src) -of$@ $(dflags) -J. $(ldflags)
%.obx: %.asx
xasm $< /o:$@ /d:HIRES=0
%16.obx: %.asx
xasm $< /o:$@ /d:HIRES=1
README.html: README.asciidoc
asciidoc $<
clean:
rm -f $(progname) *.o *.obj *.obx README.html
.PHONY: clean