forked from viveris/uMTP-Responder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
26 lines (17 loc) · 725 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
CC:=/home/jare/Desktop/zara/zara_buildroot2/prebuilts/toolchains/mips-gcc720-glibc229/bin/mips-linux-gnu-gcc
override CFLAGS += -I./inc -lpthread -Wall -O3
sources := $(wildcard src/*.c)
objects := $(sources:src/%.c=obj/%.o)
ops_sources := $(wildcard src/mtp_operations/*.c)
ops_objects := $(ops_sources:src/mtp_operations/%.c=obj/%.o)
all: umtprd
umtprd: $(objects) $(ops_objects)
${CC} -o $@ $^ $(LDFLAGS) -lpthread
$(objects): obj/%.o: src/%.c | output_dir
${CC} -o $@ $^ -c $(CPPFLAGS) $(CFLAGS)
$(ops_objects): obj/%.o: src/mtp_operations/%.c | output_dir
${CC} -o $@ $^ -c $(CPPFLAGS) $(CFLAGS)
output_dir:
@mkdir -p obj
clean:
rm -Rf *.o .*.o .*.o.* *.ko .*.ko *.mod.* .*.mod.* .*.cmd umtprd obj