summaryrefslogtreecommitdiff
path: root/Makefile
blob: b5a9e02e0de32bd8951f71e87408231509ac8aca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.PHONY: all

CFLAGS += -g -Wall -Wpedantic
CORE_OBJS = control.o reader.o config.o
PLUGINS = reader_yhy.so

%.so: CFLAGS += -shared -fPIC

%.so :: %.c %.h
	$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) $(LDLIBS)

nfcommander: LDLIBS = -ldl

all: nfcommander $(PLUGINS)

nfcommander: nfcommander.c nfcommander.h $(CORE_OBJS)

clean:
	$(RM) nfcommander
	$(RM) $(CORE_OBJS)
	$(RM) $(PLUGINS)