]> sigrok.org Git - libserialport.git/blob - examples/Makefile
Add examples directory with two example programs.
[libserialport.git] / examples / Makefile
1 CC = gcc
2 PKG_CONFIG = pkg-config
3 CFLAGS = -g -Wall $(shell $(PKG_CONFIG) --cflags libserialport)
4 LIBS = $(shell $(PKG_CONFIG) --libs libserialport)
5
6 SOURCES = $(wildcard *.c)
7
8 BINARIES = $(SOURCES:.c=)
9
10 %: %.c
11         $(CC) $(CFLAGS) $< $(LIBS) -o $@
12
13 all: $(BINARIES)
14
15 clean:
16         rm $(BINARIES)