You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
249 B
20 lines
249 B
8 months ago
|
CC = gcc
|
||
|
CFLAGS = -Wall
|
||
|
LDFLAGS = -lmodbus
|
||
|
|
||
|
SRCS = TcpSlave.c
|
||
|
OBJS = $(SRCS:.c=.o)
|
||
|
EXEC = TcpSlave
|
||
|
|
||
|
all: $(EXEC)
|
||
|
|
||
|
$(EXEC): $(OBJS)
|
||
|
$(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS)
|
||
|
|
||
|
%.o: %.c
|
||
|
$(CC) $(CFLAGS) -c $< -o $@
|
||
|
|
||
|
clean:
|
||
|
rm -f $(OBJS) $(EXEC)
|
||
|
|