forked from RetroAchievements/RALibretro
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.RAHasher
More file actions
74 lines (59 loc) · 1.62 KB
/
Makefile.RAHasher
File metadata and controls
74 lines (59 loc) · 1.62 KB
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
# supported parameters
# ARCH architecture - "x86" or "x64" [detected if not set]
# DEBUG if set to anything, builds with DEBUG symbols
include Makefile.common
# Toolset setup
CC=gcc
CXX=g++
ifeq ($(OS),Windows_NT)
EXE=.exe
KERNEL=windows
else
KERNEL := $(shell uname -s)
endif
# compile flags
DEFINES=-D_CONSOLE
CFLAGS += $(DEFINES)
CXXFLAGS += $(DEFINES)
# main
LIBS=
OBJS=\
src/components/Logger.o \
src/libmincrypt/sha256.o \
src/miniz/miniz.o \
src/miniz/miniz_tdef.o \
src/miniz/miniz_tinfl.o \
src/miniz/miniz_zip.o \
src/rcheevos/src/rhash/aes.o \
src/rcheevos/src/rhash/cdreader.o \
src/rcheevos/src/rhash/hash.o \
src/rcheevos/src/rhash/hash_disc.o \
src/rcheevos/src/rhash/hash_encrypted.o \
src/rcheevos/src/rhash/hash_rom.o \
src/rcheevos/src/rhash/hash_zip.o \
src/rcheevos/src/rhash/md5.o \
src/Hash3DS.o \
src/Util.o \
src/RAHasher.o
ifdef HAVE_CHD
OBJS += $(CHD_OBJS) \
src/HashCHD.o
endif
all: $(OUTDIR)/RAHasher$(EXE)
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
src/RA_BuildVer.h: .git/HEAD
src/RAInterface/MakeBuildVer.sh src/RA_BuildVer.h "" RA_LIBRETRO
src/RAHasher.o: src/RAHasher.cpp src/RA_BuildVer.h
$(CXX) $(CXXFLAGS) -c $< -o $@
$(OUTDIR)/RAHasher$(EXE): $(OBJS)
mkdir -p $(OUTDIR)
$(CXX) -o $@ $+ $(LDFLAGS)
zip: $(OUTDIR)/RAHasher$(EXE)
rm -f $(OUTDIR)/RAHasher-*.zip RAHasher-*.zip
zip -9 --junk-paths RAHasher-$(ARCH)-$(KERNEL)-`git describe --tags | sed s/\-.*//g | tr -d "\n"`.zip $(OUTDIR)/RAHasher$(EXE)
clean:
rm -f $(OUTDIR)/RAHasher$(EXE) $(OBJS) $(OUTDIR)/RAHasher*.zip RAHasher*.zip
.PHONY: clean FORCE