Debian Codegraph @

src/apps/Makefile

raw
1 UNAME=$(shell uname -s)
2 ifeq ($(UNAME),Linux)
3 TARGET=fathom.linux
4 endif
5 ifeq ($(UNAME),Darwin)
6 TARGET=fathom.macosx
7 endif
8 CC?=gcc
9 STRIP=strip
10 CFLAGS=-std=c99 -O2 -Wall -D TB_NO_THREADS -I..
11
12 main: $(TARGET)
13
14 fathom.linux:
15 $(CC) $(CFLAGS) fathom.c ../tbprobe.c -o fathom.linux
16 $(STRIP) fathom.linux
17
18 fathom.macosx:
19 $(CC) $(CFLAGS) fathom.c ../tbprobe.c -o fathom.macosx
20 $(STRIP) fathom.macosx
21
22 fathom.windows: CC=x86_64-w64-mingw32-gcc
23 fathom.windows: STRIP=x86_64-w64-mingw32-strip
24 fathom.windows:
25 $(CC) $(CFLAGS) fathom.c ../tbprobe.c -o fathom.exe
26 $(STRIP) fathom.exe
27
28 INSTALL=Fathom-1.0
29 PACKAGE=Fathom-1.0.zip
30 release:
31 mkdir $(INSTALL)
32 cp fathom.linux $(INSTALL)
33 cp fathom.macosx $(INSTALL)
34 cp fathom.exe $(INSTALL)
35 zip -r $(PACKAGE) $(INSTALL)
36 rm -rf $(INSTALL)
37