1
0
mirror of git://sigrok.org/libserialport synced 2023-08-10 21:13:24 +03:00

Add examples directory with two example programs.

This commit is contained in:
Martin Ling
2020-01-05 02:04:06 +00:00
parent abd31fd9f9
commit 8c1a14e658
5 changed files with 176 additions and 0 deletions

16
examples/Makefile Normal file
View File

@@ -0,0 +1,16 @@
CC = gcc
PKG_CONFIG = pkg-config
CFLAGS = -g -Wall $(shell $(PKG_CONFIG) --cflags libserialport)
LIBS = $(shell $(PKG_CONFIG) --libs libserialport)
SOURCES = $(wildcard *.c)
BINARIES = $(SOURCES:.c=)
%: %.c
$(CC) $(CFLAGS) $< $(LIBS) -o $@
all: $(BINARIES)
clean:
rm $(BINARIES)