init
This commit is contained in:
commit
5625d6bd14
11 changed files with 821 additions and 0 deletions
29
Makefile
Normal file
29
Makefile
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
CC ?= cc
|
||||
CPPFLAGS ?= -Iinclude
|
||||
CFLAGS ?= -std=c11 -O2 -Wall -Wextra -Wpedantic
|
||||
LDLIBS ?=
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
LDLIBS += -lbcrypt
|
||||
endif
|
||||
|
||||
TARGET := build/gerbera
|
||||
SOURCES := src/main.c src/encrypt.c src/decrypt.c src/cipher.c
|
||||
OBJECTS := $(SOURCES:src/%.c=build/%.o)
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS)
|
||||
|
||||
build/%.o: src/%.c include/gerbera.h | build
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
build:
|
||||
mkdir -p build
|
||||
|
||||
.PHONY: clean test
|
||||
|
||||
test: $(TARGET)
|
||||
GERBERA_BIN=./$(TARGET) sh tests/test.sh
|
||||
|
||||
clean:
|
||||
rm -rf build
|
||||
Loading…
Add table
Add a link
Reference in a new issue