File: Makefile

package info (click to toggle)
libserialport 0.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,112 kB
  • sloc: sh: 4,691; ansic: 4,190; makefile: 64
file content (20 lines) | stat: -rw-r--r-- 404 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# A simple Makefile to build the examples in this directory.
#
# This example file is released to the public domain.

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)