-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (31 loc) · 774 Bytes
/
Makefile
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
# www.icosaedro.it/c-modules.html
debug=1
GCC_FLAGS = -Wall -Wextra -DDEBUG -g3
CLANG_FLAGS = -Weverything -DDEBUG -g -O0
ifeq ($(debug), 0)
GCC_FLAGS = -Wall -Wextra -DNDEBUG
CLANG_FLAGS = -Weverything -DNDEBUG
endif
GCC = gcc
CLANG = clang
COMPILER = $(GCC)
CFLAGS = $(GCC_FLAGS)
ifeq ($(compiler), clang)
COMPILER = $(CLANG)
CFLAGS = $(CLANG_FLAGS)
endif
CC = $(COMPILER)
.PHONY: clean
BIN = randomart
OBJS = strtol_wrap.o base64_d.o
$(BIN): $(OBJS) $(BIN).c
$(CC) $(CFLAGS) $(OBJS) $(BIN).c -o $(BIN)
%.o: %.c %.h
$(CC) -c $(CFLAGS) $< -o $@
base64_d: base64_d_cli.c base64_d.o
$(CC) $(CFLAGS) [email protected] $< -o $@
strtol_wrap: strtol_wrap_cli.c strtol_wrap.o
$(CC) $(CFLAGS) [email protected] $< -o $@
clean:
rm -f $(BIN) base64_d strtol_wrap *.o a.out
rm -rf *.dSYM