Last active
August 29, 2015 14:04
-
-
Save dpapathanasiou/f64e29efc4a47aa9202a to your computer and use it in GitHub Desktop.
Makefile for libmodbus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHELL = /bin/sh | |
CC = gcc | |
FLAGS = -I /usr/local/include/modbus | |
LDIR = /usr/local/lib | |
LIBS = -lmodbus | |
%: %.c | |
$(CC) $(FLAGS) $^ -o $@ -L$(LDIR) $(LIBS) | |
TARGETS = $(shell echo *.c | sed -e 's/\.c//g') | |
all: $(TARGETS) | |
clean: | |
rm $(TARGETS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This will work with libmodbus installed from source, using the default configuration target.