forked from 71/scoop-better-shimexe
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·41 lines (29 loc) · 739 Bytes
/
Copy pathMakefile
File metadata and controls
executable file
·41 lines (29 loc) · 739 Bytes
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
CC=clang++.exe
CFLAGS=-std=c++17 -m32
ODIR = obj
BDIR = bin
ADIR = archive
TARGET = $(BDIR)/shim.exe
OBJ = shim.o
OBJS = $(patsubst %,$(ODIR)/%,$(OBJ))
$(TARGET): $(OBJS) | $(BDIR)
$(CC) -o $(TARGET) $^ $(CFLAGS) -Ofast -static
sha256sum $(TARGET) > $(BDIR)/checksum.sha256
sha512sum $(TARGET) > $(BDIR)/checksum.sha512
$(ODIR)/%.o: %.cpp | $(ODIR)
$(CC) -c -o $@ $< $(CFLAGS) -Ofast -g
$(ODIR):
mkdir -p $(ODIR)
$(BDIR):
mkdir -p $(BDIR)
.PHONY: clean debug zip
clean:
rm -f $(ODIR)/*.*
rm -f $(BDIR)/*.*
debug: $(OBJS) | $(BDIR)
$(CC) -o $(BDIR)/shim.exe $^ $(CFLAGS) -g
$(ADIR):
mkdir -p $(ADIR)
$(ADIR)/shimexe.zip: $(TARGET) | $(ADIR)
cd $(ADIR) && zip -j -9 shimexe.zip ../$(BDIR)/*.*
zip: $(ADIR)/shimexe.zip