diff options
author | Mattias Andrée <maandree@kth.se> | 2021-09-16 18:26:49 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-09-16 18:26:49 +0200 |
commit | 63eeae2e150fc4dca0d178c2644db3d5c4a16328 (patch) | |
tree | fe453e9022dcaf41f4ea0ff665f2277a58bb01a2 /Makefile | |
parent | add alloca (diff) | |
download | malloc-vs-new-63eeae2e150fc4dca0d178c2644db3d5c4a16328.tar.gz malloc-vs-new-63eeae2e150fc4dca0d178c2644db3d5c4a16328.tar.bz2 malloc-vs-new-63eeae2e150fc4dca0d178c2644db3d5c4a16328.tar.xz |
Improve makefile, style, and gitignore
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | Makefile | 24 |
1 files changed, 17 insertions, 7 deletions
@@ -2,17 +2,27 @@ # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without any warranty. +.POSIX: +CXX = c++ -.PHONY: all -all: bin/malloc bin/new bin/alloca +BIN = malloc new alloca +OBJ = $(BIN:=.o) -bin/%: src/%.cc - @mkdir -p bin - $(CXX) -O0 -o $@ $^ +all: $(BIN) +$(OBJ): + +.cc.o: + $(CXX) -c -o $@ $< -O0 + +.o: + $(CXX) -o $@ $< -.PHONY: clean clean: - -rm -r bin + -rm -f -- *.o $(BIN) + +.SUFFIXES: +.SUFFIXES: .o .cc +.PHONY: all clean |