summaryrefslogtreecommitdiff
path: root/makefile
blob: d8422992c6ed2d3ff9ec35678cdb39ad31476384 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
all: bcrypt-test

# git clone https://github.com/mikejsavage/lua-bcrypt.git
LUA_BCRYPT_PATH=../lua-bcrypt/src

CFLAGS=-Wall -Werror -Wno-pointer-sign -std=c17 -O2 -I$(LUA_BCRYPT_PATH)

bcrypt-test: bcrypt-test.o bcrypt-lib.a
	cc -o $@ bcrypt-test.o bcrypt-lib.a

bcrypt-lib.a: bcrypt.o blowfish.o ggentropy.o safebfuns.o
	ar -crs $@ $^

%.o: %.c
	cc $(CFLAGS) -o $@ -c $<

%.o: $(LUA_BCRYPT_PATH)/%.c
	cc $(CFLAGS) -o $@ -c $<

.PHONY: clean
clean:
	rm -f bcrypt-test *.a *.o