File: Makefile

package info (click to toggle)
retroarch 1.3.6%2Bdfsg1-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 26,496 kB
  • ctags: 41,865
  • sloc: ansic: 250,395; cpp: 12,996; makefile: 3,500; objc: 3,266; xml: 2,141; python: 1,670; sh: 1,522; java: 798; asm: 542; perl: 393
file content (98 lines) | stat: -rw-r--r-- 1,888 bytes parent folder | download | duplicates (4)
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
compiler    := gcc
extra_flags :=
use_neon    := 0
release	   := release
DYLIB	      :=

ifeq ($(platform),)
platform = unix
ifeq ($(shell uname -a),)
   platform = win
else ifneq ($(findstring MINGW,$(shell uname -a)),)
   platform = win
else ifneq ($(findstring Darwin,$(shell uname -a)),)
   platform = osx
   arch = intel
ifeq ($(shell uname -p),powerpc)
   arch = ppc
endif
else ifneq ($(findstring win,$(shell uname -a)),)
   platform = win
endif
endif

ifeq ($(platform),gcc)
extra_rules_gcc := $(shell $(compiler) -dumpmachine)
endif

ifneq (,$(findstring armv7,$(extra_rules_gcc)))
extra_flags += -mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=neon
use_neon := 1
endif

ifneq (,$(findstring hardfloat,$(extra_rules_gcc)))
extra_flags += -mfloat-abi=hard
endif

ifeq (release,$(build))
extra_flags += -O2
endif

ifeq (debug,$(build))
extra_flags += -O0 -g
endif

ldflags := -shared -Wl,--version-script=link.T

ifeq ($(platform), unix)
DYLIB =
else ifeq ($(platform), osx)
compiler := $(CC)
DYLIB =
ldflags := -dynamiclib
else
extra_flags += -static-libgcc -static-libstdc++
DYLIB = exe
endif

CC      := $(compiler)
CXX     := $(subst CC,++,$(compiler))
flags   := -fPIC $(extra_flags) -I../../libretro-common/include
asflags := -fPIC  $(extra_flags)
LDFLAGS := -lz
flags   += -std=c99 -DMD5_BUILD_UTILITY


ifeq (1,$(use_neon))
ASMFLAGS := -INEON/asm
asflags += -mfpu=neon
endif

OBJS += djb2.o md5.o sha1.o crc32.o
UTILS += djb2$(DYLIB) md5$(DYLIB) sha1$(DYLIB) crc32$(DYLIB)

all: djb2$(DYLIB) md5$(DYLIB) sha1$(DYLIB) crc32$(DYLIB)

djb2$(DYLIB): djb2.o

md5$(DYLIB): md5.o

sha1$(DYLIB): sha1.o

crc32$(DYLIB): crc32.o

%.o: %.S
	$(CC) -c -o $@ $(asflags) $(LDFLAGS)  $(ASMFLAGS)  $<

%.o: %.c
	$(CC) -c -o $@ $(flags) $<

%.$(DYLIB): %.o
	$(CC) -o $@ $(ldflags) $(flags) $^

clean:
	rm -f *.o
	rm -f djb2$(DYLIB) md5$(DYLIB) sha1$(DYLIB) crc32$(DYLIB)

strip:
	strip -s *.$(DYLIB)