-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
79 lines (71 loc) · 2.35 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# BOOTDISK v1.6
#
# Makefile for Darwin and Linux
#
OS := $(shell uname)
ifeq ($(OS),Darwin)
PREFIX ?= /opt/local
CFLAGS = -target x86_64-apple-macos10.6
else
PREFIX ?= /usr/local
endif
BINDIR = $(PREFIX)/bin
RESDIR = $(PREFIX)/share/BOOTDISK
all:
ifeq ($(OS),Darwin)
$(MAKE) exfatboot
endif
install:
install -d $(BINDIR)
install -d $(RESDIR)/Support
install -m 755 bootdisk.sh $(BINDIR)/bootdisk
ifeq ($(OS),Darwin)
ifneq (,$(wildcard Support/exfatboot))
install -m 755 Support/exfatboot $(BINDIR)
endif
install -m 755 Support/click_ignore.scpt $(RESDIR)/Support
endif
install -m 755 Support/extract_msdos.sh $(RESDIR)/Support
install -m 755 Support/uefishelldisk.sh $(RESDIR)/Support
install -m 755 Support/modtime.py $(RESDIR)/Support
install -m 644 Support/doslfn.zip $(RESDIR)/Support
install -m 644 Support/About.txt $(RESDIR)/Support
rsync -r --chmod=u=rwx,go=rx FreeDOS $(RESDIR)
rsync -r --chmod=u=rwx,go=rx MS-DOS $(RESDIR)
rsync -r --chmod=u=rwx,go=rx Windows $(RESDIR)
chmod o+w $(RESDIR)/Support
uninstall:
$(RM) $(BINDIR)/bootdisk
ifeq ($(OS),Darwin)
ifneq (,$(wildcard $(BINDIR)/exfatboot))
$(RM) $(BINDIR)/exfatboot
endif
endif
$(RM) -r $(RESDIR)
update:
$(RM) $(BINDIR)/bootdisk
$(RM) $(RESDIR)/Support/About.txt
$(RM) $(RESDIR)/Support/extract_msdos.sh
$(RM) $(RESDIR)/Support/Fido.*
$(RM) $(RESDIR)/Windows/Scripts/*.sh
$(RM) $(RESDIR)/Windows/Scripts/*.reg
$(RM) $(RESDIR)/Windows/windowstogo.sh
find $(RESDIR) -type f -name '*disk.sh' -delete
install -m 755 bootdisk.sh $(BINDIR)/bootdisk
install -m 755 FreeDOS/freedosdisk.sh $(RESDIR)/FreeDOS
install -m 755 MS-DOS/msdosdisk.sh $(RESDIR)/MS-DOS
install -m 644 Support/About.txt $(RESDIR)/Support
install -m 755 Support/uefishelldisk.sh $(RESDIR)/Support
install -m 755 Support/extract_msdos.sh $(RESDIR)/Support
install -m 755 Windows/windowsdisk.sh $(RESDIR)/Windows
install -m 755 Windows/windowstogo.sh $(RESDIR)/Windows
install -m 755 Windows/Scripts/unattend.sh $(RESDIR)/Windows/Scripts
install -m 755 Windows/Scripts/unsupported.sh $(RESDIR)/Windows/Scripts
install -m 644 Windows/Scripts/Disable_Hardware_Checks.reg $(RESDIR)/Windows/Scripts
install -m 644 Windows/Scripts/Disable_Internal_Drives.reg $(RESDIR)/Windows/Scripts
clean:
ifeq ($(OS),Darwin)
$(RM) Support/exfatboot
endif
exfatboot: %: Support/%.c
$(CC) -o Support/$@ $^ $(CFLAGS)