Skip to content

Commit

Permalink
test package
Browse files Browse the repository at this point in the history
  • Loading branch information
arturaspaulius committed Nov 11, 2022
0 parents commit e95fef7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
DEPS = $(wildcard *.h)
SRC = $(wildcard src/*.c)
OBJ = $(patsubst %.c, %.o, $(SRC))
TARGET = modbusd
CFLAGS+=-std=gnu99
RM = rm -f

ifneq (,$(findstring IO_SUPPORT,$(CFLAGS)))
LDFLAGS += -lioman
endif


all: $(TARGET)

%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)

$(TARGET): $(OBJ)
$(CC) -o $@ $^ $(LDFLAGS)

.PHONY: clean

clean:
$(RM) $(OBJ) $(TARGET)

8 changes: 8 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include <stdio.h>

int main()
{
printf("It works!\n");

return 0;
}

0 comments on commit e95fef7

Please sign in to comment.