Skip to content

Commit

Permalink
added code
Browse files Browse the repository at this point in the history
  • Loading branch information
jasminaorlowska committed Jun 20, 2023
1 parent f9432ea commit 7964cc3
Show file tree
Hide file tree
Showing 5 changed files with 676 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
.vscode
19 changes: 19 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
CC=gcc
CFLAGS=-Wall -Wextra -Wno-implicit-fallthrough -std=gnu17 -fPIC -O2 -g
LDFLAGS=-shared -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=realloc -Wl,--wrap=reallocarray -Wl,--wrap=free -Wl,--wrap=strdup -Wl,--wrap=strndup

all: libseq.so
str.o: str.c str.h
@$(CC) $(CFLAGS) -c str.c
seq.o: seq.c seq.h str.h
@$(CC) $(CFLAGS) -c seq.c
seq_example.o: seq_example.c seq.h memory_tests.h
@$(CC) $(CFLAGS) -c seq_example.c
memory_tests.o: memory_tests.h memory_tests.c
@$(CC) $(CFLAGS) -c memory_tests.c
example: libseq.so seq_example.o
@$(CC) $(CFLAGS) -o example -g seq_example.o -L. -lseq
libseq.so: seq.o str.o memory_tests.o
@$(CC) $(CFLAGS) $(LDFLAGS) -o libseq.so $^
clean:
@rm -f *.o test libseq.so
Loading

0 comments on commit 7964cc3

Please sign in to comment.