summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/Makefile b/src/Makefile
index 88c5344..e32f72b 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,5 +1,6 @@
1CC = gcc 1CC = gcc
2SHELL := bash 2SHELL := /usr/bin/env
3.SHELLFLAGS := -S bash -c
3 4
4# I need to get better at makefiles so I can write this in a way that isn't absolutely insane/stupid 5# I need to get better at makefiles so I can write this in a way that isn't absolutely insane/stupid
5# RELEASE_CFLAGS := -O3 -fipa-pta -fipa-cp -fuse-linker-plugin -flto=auto 6# RELEASE_CFLAGS := -O3 -fipa-pta -fipa-cp -fuse-linker-plugin -flto=auto
@@ -11,18 +12,19 @@ LDFLAGS += $$(pkg-config --libs-only-L libsodium)
11 12
12SOURCES := $(wildcard *.c) 13SOURCES := $(wildcard *.c)
13OBJECTS := $(patsubst %.c,%.o,$(SOURCES)) 14OBJECTS := $(patsubst %.c,%.o,$(SOURCES))
14DEPS := $(patsubst %.c,%.dep,$(SOURCES)) 15DEPS := $(patsubst %.c,%.d,$(SOURCES))
15 16
16.PHONY: all c clean val 17.PHONY: all c clean val
17.DELETE_ON_ERROR: 18.DELETE_ON_ERROR:
18.ONESHELL: 19.ONESHELL:
19 20
20all: main 21all: main
21main: main.o encryption.o shared.o ll.o arena.o 22main: $(OBJECTS)
22 23
23$(OBJECTS): %.o: %.dep 24$(OBJECTS): %.o: %.d
24%.dep: %.c 25include $(DEPS) # Make sure the dependencies are actually included
25 ./depend.sh `dirname $*` $(CFLAGS) $*.c > $@ 26%.d: %.c
27 ./depend.sh $$(dirname $*) $(CFLAGS) $*.c > $@
26 28
27c clean: 29c clean:
28 @-rm -rv main $(OBJECTS) $(DEPS) $(wildcard *.test*) $(wildcard *.enc) 30 @-rm -rv main $(OBJECTS) $(DEPS) $(wildcard *.test*) $(wildcard *.enc)