summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authortanyaionova <isaqtm@gmail.com>2019-11-20 22:03:16 +0300
committertanyaionova <isaqtm@gmail.com>2019-11-20 22:03:16 +0300
commit48debdf040d0e0b1af8d11a339ce8332e2454d3f (patch)
treec42b2ad8c839b21750c32a4f56ad83f9c19b2419 /Makefile
downloadash-sbox-48debdf040d0e0b1af8d11a339ce8332e2454d3f.tar.gz
Init
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile31
1 files changed, 31 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..43e275c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,31 @@
+TARGET = const
+CFLAGS += -Wall -Wextra -Wshadow -pedantic -g
+CFLAGS += $(shell echo $(fast) | sed -e 's/yes/-DFAST_AS_FUCK/g')
+LDLIBS += -L$(shell jemalloc-config --libdir) -Wl,-rpath,$(shell jemalloc-config --libdir) -ljemalloc $(shell jemalloc-config --libs)
+LDLIBS += -lprofiler
+ACO_FLAGS = -Wall -Werror -DACO_USE_VALGRIND
+RM ?= rm -f
+
+all: $(TARGET)
+
+ACO_SRC = libaco/aco.c
+ACO_ASM = libaco/acosw.S
+ACO = aco.o
+$(ACO): $(ACO_SRC)
+ $(CC) -c -o $@ $^ $(ACO_FLAGS) $(LDLIBS) $(CPPFLAGS)
+
+
+log.o: log.c log.h
+
+$(TARGET): const.c $(ACO) $(ACO_ASM) log.o
+
+very_const: very_const.c log.o
+
+cc: cc_const.cc log.c log.h
+ $(CXX) cc_const.cc log.c -o cc_const $(CFLAGS) $(LDLIBS) -lstdc++ --std=c++14
+
+run: $(TARGET)
+ ./$(TARGET)
+
+clean:
+ $(RM) $(TARGET) *.o