summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: bdc6a7dda13897f2bc9710551abb98af593ef5dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CC = gcc
CFLAGS = -march=native -Wall -Wpedantic -lcrypto
SOURCE = onetimebluh
TARGET = otbluh
PREFIX = /usr
LIBRARY = libluh

all: $(SOURCE)

$(SOURCE): src/$(SOURCE).c
	mkdir build
	$(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
	install build/$(TARGET) $(DESTDIR)$(PREFIX)/bin

clean: 
	$(RM) -r build