Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions bdz2/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
CC = gcc
CFLAGS = -Wall -fPIC
LDFLAGS = -shared
LIB_NAME = libbdz2.so
TEST_EXEC = test_bdz2

all: $(LIB_NAME) $(TEST_EXEC)

$(LIB_NAME): bdz2.o
$(CC) $(LDFLAGS) -o $@ $^

bdz2.o: bdz2.c bdz2.h
$(CC) $(CFLAGS) -c $< -o $@

$(TEST_EXEC): test_bdz2.o unity.o
$(CC) -o $@ $^ -L. -lbdz2 -Wl,-rpath=.

test_bdz2.o: test_bdz2.c bdz2.h unity.h
$(CC) $(CFLAGS) -c $< -o $@

unity.o: unity.c unity.h
$(CC) $(CFLAGS) -c $< -o $@

run-test: $(TEST_EXEC)
./$(TEST_EXEC)

clean:
rm -f *.o $(LIB_NAME) $(TEST_EXEC)
touch clean
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

пропустил \n

Loading