blob: ed84ee9aa56a708e05936f7da0114ef4f982af23 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
CC=gcc
CFLAGS = -Wall -Wextra -O2 -g
SRCS = $(wildcard *.c)
OBJS = $(SRCS:%.c=%.o)
EXE = test-usb-hid
all: $(EXE)
$(EXE): $(OBJS)
-include $(subst .c,.d,$(SRCS))
%.d: %.c
$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -MM -MF $@ -MP -MT $(subst .c,.o,$<) $<
clean:
rm -f $(EXE)
rm -f $(OBJS)
rm -f $(subst .c,.d,$(SRCS))
rm -f *~
.PHONY: clean all
|