Skip to content

Commit

Permalink
Update makefile and support musl libc
Browse files Browse the repository at this point in the history
  • Loading branch information
SadPencil committed May 26, 2022
1 parent c9c6223 commit 5da8c53
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ shell_lib.a: $(objects)


test: build
./client www.google.com
./client

clean:
rm client
Expand Down
20 changes: 20 additions & 0 deletions Makefile.musl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
CC = musl-gcc
CFLAGS = -g -Wall -static

objects = client.o dns_c.h socket_utils.o constructor.o c_utils.o parser.o


build: shell_lib.a
$(CC) $(CFLAGS) -o client client.c dns_client.a

shell_lib.a: $(objects)
ar -r dns_client.a $(objects)


test: build
./client

clean:
rm client
rm -f *.o
rm -f dns_client.a

0 comments on commit 5da8c53

Please sign in to comment.