Skip to content

Commit

Permalink
Add a makefile option to build static library for pacparser (#205)
Browse files Browse the repository at this point in the history
Fixes: #148
  • Loading branch information
manugarg authored Jul 25, 2024
1 parent 3d36682 commit 08702a9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,15 @@ pacparser.o: pacparser.c pac_utils.h pacparser.h jsapi_buildstamp
$(LIBRARY): pacparser.o spidermonkey/libjs.a
$(MKSHLIB) $(MAINT_CFLAGS) $(CFLAGS) $(LDFLAGS) $(LIB_OPTS) -o $(LIBRARY) pacparser.o spidermonkey/libjs.a -lm

libpacparser.a: pacparser.o spidermonkey/libjs.a
cp spidermonkey/libjs.a libpacparser.a
ar rcs libpacparser.a pacparser.o

$(LIBRARY_LINK): $(LIBRARY)
ln -sf $(LIBRARY) $(LIBRARY_LINK)

pactester: pactester.c pacparser.h pacparser.o spidermonkey/libjs.a
$(CC) $(MAINT_CFLAGS) $(CFLAGS) $(LDFLAGS) pactester.c pacparser.o spidermonkey/libjs.a -o pactester -lm -L. -I.
pactester: pactester.c pacparser.h libpacparser.a
$(CC) $(MAINT_CFLAGS) $(CFLAGS) $(LDFLAGS) pactester.c libpacparser.a -o pactester -lm -L. -I.

testpactester: pactester $(LIBRARY_LINK)
echo "Running tests for pactester."
Expand Down

0 comments on commit 08702a9

Please sign in to comment.