summaryrefslogtreecommitdiff
path: root/src/Makefile
blob: a0ad936bd0637d8f2d3e26085358748110006f8f (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
CC         = gcc
CFLAGS     = -O3 -Wall -I/usr/include -I. -fsanitize=address
DEFS       = -D__DEBUG__

LDFLAGS    = -L/usr/lib64
LIBS       = -lasan -lm -lreadline


SOURCES = main.c commands.c completion.c utils.c shell.c users.c
OBJECTS = main.o commands.o completion.o utils.o shell.o users.o


.SUFFIXES:
.SUFFIXES: .o .c
%.o : %.c
	$(CC) -g $(CFLAGS) $(DEFS) $(INCLUDIES) -c $< -o $@


all: main

main: $(OBJECTS)
	$(CC) $(LDFLAGS) -o main $(OBJECTS) $(LIBS)


clean:
	rm -f *.o main