diff options
Diffstat (limited to 'src/Makefile')
| -rw-r--r-- | src/Makefile | 14 |
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 @@ | |||
| 1 | CC = gcc | 1 | CC = gcc |
| 2 | SHELL := bash | 2 | SHELL := /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 | ||
| 12 | SOURCES := $(wildcard *.c) | 13 | SOURCES := $(wildcard *.c) |
| 13 | OBJECTS := $(patsubst %.c,%.o,$(SOURCES)) | 14 | OBJECTS := $(patsubst %.c,%.o,$(SOURCES)) |
| 14 | DEPS := $(patsubst %.c,%.dep,$(SOURCES)) | 15 | DEPS := $(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 | ||
| 20 | all: main | 21 | all: main |
| 21 | main: main.o encryption.o shared.o ll.o arena.o | 22 | main: $(OBJECTS) |
| 22 | 23 | ||
| 23 | $(OBJECTS): %.o: %.dep | 24 | $(OBJECTS): %.o: %.d |
| 24 | %.dep: %.c | 25 | include $(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 | ||
| 27 | c clean: | 29 | c clean: |
| 28 | @-rm -rv main $(OBJECTS) $(DEPS) $(wildcard *.test*) $(wildcard *.enc) | 30 | @-rm -rv main $(OBJECTS) $(DEPS) $(wildcard *.test*) $(wildcard *.enc) |
