-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
28 lines (21 loc) · 963 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
CC = gcc
STUFF = $(shell pkg-config --cflags glib-2.0 libusb-1.0 jansson libwebsockets) -D_GNU_SOURCE
STUFF_LIBS = $(shell pkg-config --libs glib-2.0 libusb-1.0 jansson libwebsockets)
OPTS = -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wunused #-Werror #-O2
GDB = -g -ggdb
#~ ASAN = -O1 -g3 -ggdb3 -fno-omit-frame-pointer -fsanitize=address -fno-sanitize-recover=all -fsanitize-address-use-after-scope
#~ ASAN_LIBS = -fsanitize=address
DNAFX_EDITOR = dnafx-editor
DNAFX_EDITOR_OBJS = src/dnafx-editor.o src/options.o \
src/usb.o src/tasks.o src/presets.o src/utils.o \
src/httpws.o src/embedded_cli.o
all: $(DNAFX_EDITOR)
DEPS := $(DNAFX_EDITOR_OBJS:.o=.d)
-include $(DEPS)
%.o: %.c
$(CC) $(ASAN) $(STUFF) -fPIC $(GDB) -MMD -c $< -o $@ $(OPTS)
$(DNAFX_EDITOR): $(DNAFX_EDITOR_OBJS)
$(CC) $(GDB) -o $(DNAFX_EDITOR) $(DNAFX_EDITOR_OBJS) $(ASAN_LIBS) $(STUFF_LIBS)
clean:
rm -f $(DNAFX_EDITOR) src/*.o src/*.d
.PHONY: all clean