-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (29 loc) · 816 Bytes
/
Copy pathMakefile
File metadata and controls
37 lines (29 loc) · 816 Bytes
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
CC=gcc
LD=gcc
GTKFLAGS=-export-dynamic `pkg-config --cflags --libs gtk+-3.0`
CFLAGS=-I$(DEPDIR) -O0 -Wall -Wno-format $(GTKFLAGS)
LFLAGS=$(GTKFLAGS)
LIBS=-pthread
SRCDIR=src
DEPDIR = src
_DEPS = attiny13.h gui.h gui_pins.h gui_pins_positions.h \
common.h decode.h registers_list.h threads.h
_SRCS = attiny13.c gui.c gui_pins.c gui_callbacks.c main.c \
do_functions.c threads.c common.c
SRCS = $(patsubst %,$(SRCDIR)/%,$(_SRCS))
DEPS = $(patsubst %,$(DEPDIR)/%,$(_DEPS))
OBJDIR=obj
_OBJ = $(_SRCS:.c=.o)
OBJ = $(patsubst %,$(OBJDIR)/%,$(_OBJ))
all: $(OBJDIR) tags main
$(OBJDIR):
mkdir $(OBJDIR) || true
obj/%.o: src/%.c $(DEPS)
$(CC) $(CFLAGS) -c $< -o $@
main: $(OBJ)
$(LD) $^ $(LFLAGS) $(LIBS) -o $@
clean:
rm -rf $(OBJDIR) || true
rm tags main || true
tags: $(SRCS) $(DEPS)
ctags -R