-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
71 lines (58 loc) · 1.54 KB
/
Copy pathMakefile
File metadata and controls
71 lines (58 loc) · 1.54 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
# définition des cibles particulières
.PHONY: clean, mrproper
# désactivation des règles implicites
.SUFFIXES:
UNAME_S:=$(shell uname -s)
CC=gcc
CL=clang
STRIP=strip
CFLAGS= -O3 -Wall -W -Wstrict-prototypes -Werror -Wextra -Wuninitialized
ifeq ($(UNAME_S),Linux)
IFLAGSDIR= -I/usr/include
LFLAGSDIR= -L/usr/lib
COMPIL=$(CC)
endif
ifeq ($(UNAME_S),Darwin)
IFLAGSDIR= -I/opt/local/include
LFLAGSDIR= -L/opt/local/lib
COMPIL=$(CL)
endif
GL_FLAGS= -lGL -lGLU -lglut
NET_FLAGS= -lnet -lpcap
MATH_FLAGS= -lm
AES_FLAGS= -lcrypto
PNG_FLAGS= -lpng
FFTW_FLAGS = -lfftw3
GMP_FLAGS= -lgmp
all: dest_sys visualize3d specialNumbers network prbg picture pi hilbert
hilbert: hilbert.c
$(COMPIL) $(CFLAGS) $(IFLAGSDIR) $(LFLAGSDIR) $(MATH_FLAGS) $(GL_FLAGS) $(PNG_FLAGS) $< -o $@
@$(STRIP) $@
pi: pi.c
$(COMPIL) $(CFLAGS) $(IFLAGSDIR) $(LFLAGSDIR) $(GMP_FLAGS) $< -o $@
@$(STRIP) $@
picture: picture.c
$(COMPIL) $(CFLAGS) $(IFLAGSDIR) $(LFLAGSDIR) $(MATH_FLAGS) $< -o $@
@$(STRIP) $@
visualize3d: visualize3d.c
$(COMPIL) $(CFLAGS) $(IFLAGSDIR) $(LFLAGSDIR) $(FFTW_FLAGS) $(MATH_FLAGS) $(GL_FLAGS) $(PNG_FLAGS) $< -o $@
@$(STRIP) $@
network: network.c
$(COMPIL) $(CFLAGS) $(IFLAGSDIR) $(LFLAGSDIR) $(NET_FLAGS) $< -o $@
@$(STRIP) $@
specialNumbers: specialNumbers.c
$(COMPIL) $(CFLAGS) $(MATH_FLAGS) $< -o $@
@$(STRIP) $@
prbg: prbg.c
$(COMPIL) $(CFLAGS) $(MATH_FLAGS) $< -o $@
@$(STRIP) $@
dest_sys:
@echo "Destination system:" $(UNAME_S)
clean:
@rm -f visualize3d
@rm -f specialNumbers
@rm -f network
@rm -f prbg
@rm -f picture
@rm -f pi
@rm -f hilbert