summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 16bfc92..bdc6a7d 100644
--- a/Makefile
+++ b/Makefile
@@ -3,12 +3,15 @@ CFLAGS = -march=native -Wall -Wpedantic -lcrypto
SOURCE = onetimebluh
TARGET = otbluh
PREFIX = /usr
+LIBRARY = libluh
all: $(SOURCE)
$(SOURCE): src/$(SOURCE).c
mkdir build
- $(CC) $(CFLAGS) -o build/$(TARGET) src/$(SOURCE).c -v
+ $(CC) $(CFLAGS) -c -o build/$(LIBRARY).o src/$(LIBRARY).c -v
+ $(CC) $(CFLAGS) -c -o build/$(SOURCE).o src/$(SOURCE).c -v
+ $(CC) $(CFLAGS) -o build/$(TARGET) build/$(SOURCE).o build/$(LIBRARY).o -v
install:
mkdir -p $(DESTDIR)$(PREFIX)/bin