summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile19
1 files changed, 14 insertions, 5 deletions
diff --git a/makefile b/makefile
index f98f66c..e0a8644 100644
--- a/makefile
+++ b/makefile
@@ -1,13 +1,22 @@
1all: bcrypt-test 1all: bcrypt-test
2 2
3CFLAGS =-Wall -Werror -std=c99 -pedantic -g 3# git clone https://github.com/mikejsavage/lua-bcrypt.git
4LUA_BCRYPT_PATH=../lua-bcrypt/src
4 5
5bcrypt-test: bcrypt-test.o 6CFLAGS =-Wall -Werror -Wno-pointer-sign -std=c17 -O2 -I$(LUA_BCRYPT_PATH)
6 cc -o $@ bcrypt-test.o lua-bcrypt/bcrypt.a
7 7
8bcrypt-test.o: bcrypt-test.c 8bcrypt-test: bcrypt-test.o bcrypt-lib.a
9 cc -o $@ bcrypt-test.o bcrypt-lib.a
10
11bcrypt-lib.a: bcrypt.o blowfish.o ggentropy.o safebfuns.o
12 ar -crs $@ $^
13
14%.o: %.c
15 cc $(CFLAGS) -o $@ -c $<
16
17%.o: $(LUA_BCRYPT_PATH)/%.c
9 cc $(CFLAGS) -o $@ -c $< 18 cc $(CFLAGS) -o $@ -c $<
10 19
11.PHONY: clean 20.PHONY: clean
12clean: 21clean:
13 rm -f bcrypt-test bcrypt-test.o 22 rm -f bcrypt-test *.a *.o