blob: ec5930a431b43de11d4e97b6550670d221dec902 (
plain)
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
|
CC=egcc
CFLAGS_TESTBIN=-O3 -Wfatal-errors -Wall -Werror -Wextra -g -Wpedantic -std=c99
CFLAGS=-O3 -flto -march=native -DNDEBUG -fomit-frame-pointer -s -std=gnu99
TARGET1=s_linkedlist
TARGET2=d_linkedlist
TESTTARGET1=s_linkedlist-t
TESTTARGET2=d_linkedlist-t
INSTALL_DIRECTORY=/usr/local/bin
MAKEFLAGS += -s
SRCSL=s_linkedlist.c
SRCDL=d_linkedlist.c
all: release
clean:
rm -f $(TARGET1) $(TARGET2)
rm -f test/$(TESTTARGET1) test/$(TESTTARGET2)
tests:
$(CC) $(CFLAGS_TESTBIN) $(SRCSL) -o test/$(TESTTARGET1)
$(CC) $(CFLAGS_TESTBIN) $(SRCDL) -o test/$(TESTTARGET2)
echo "$(TESTTARGET) is done."
release:
$(CC) $(CFLAGS) $(SRCSL) -o $(TARGET1)
$(CC) $(CFLAGS) $(SRCDL) -o $(TARGET2)
|