diff options
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 19 |
1 files changed, 14 insertions, 5 deletions
| @@ -1,13 +1,22 @@ | |||
| 1 | all: bcrypt-test | 1 | all: bcrypt-test |
| 2 | 2 | ||
| 3 | CFLAGS =-Wall -Werror -std=c99 -pedantic -g | 3 | # git clone https://github.com/mikejsavage/lua-bcrypt.git |
| 4 | LUA_BCRYPT_PATH=../lua-bcrypt/src | ||
| 4 | 5 | ||
| 5 | bcrypt-test: bcrypt-test.o | 6 | CFLAGS =-Wall -Werror -Wno-pointer-sign -std=c17 -O2 -I$(LUA_BCRYPT_PATH) |
| 6 | cc -o $@ bcrypt-test.o lua-bcrypt/bcrypt.a | ||
| 7 | 7 | ||
| 8 | bcrypt-test.o: bcrypt-test.c | 8 | bcrypt-test: bcrypt-test.o bcrypt-lib.a |
| 9 | cc -o $@ bcrypt-test.o bcrypt-lib.a | ||
| 10 | |||
| 11 | bcrypt-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 |
| 12 | clean: | 21 | clean: |
| 13 | rm -f bcrypt-test bcrypt-test.o | 22 | rm -f bcrypt-test *.a *.o |
