Skip to content

Commit

Permalink
Merge pull request #2 from Aztorius/master
Browse files Browse the repository at this point in the history
Change Makefile to add dynamic build
  • Loading branch information
m4tthi4s authored Nov 29, 2017
2 parents 35c8c0d + abbb3cc commit 28ec82a
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
CC = gcc -static -Wall -Werror
#CC = gcc -g -static -Wall -Werror
#CC = gcc -Wall -Werror
CC = gcc

LDFLAGS = -L../libgcrypt-1.7.6/src/.libs -lgcrypt \
CFLAGS = -Wall -Werror
# CFLAGS += -g

STATIC = -L../libgcrypt-1.7.6/src/.libs -lgcrypt \
-L../libgpg-error-1.27/src/.libs -lgpg-error

src = vukextract.c
obj = $(src:.c=.o)
LDFLAGS = $(shell libgcrypt-config --libs)

all: vukextract
src = vukextract.c
obj = $(src:.c=.o)

all: vukextract

#normal shared linking
vukextract: $(obj)
$(CC) -o $@ $^ $(LDFLAGS)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)

#static linking for prebuild binaries
static: $(obj)
$(CC) $(CFLAGS) -o $@ $^ -static $(STATIC)

clean:
rm -f $(obj) vukextract

0 comments on commit 28ec82a

Please sign in to comment.