ASCDIR=asc APP_CFLAGS=${ASCDIR}/kernels/crt0.s -D _BSD_SOURCE -nostdinc -isystem /usr/include/diet -ggdb3 -Wno-deprecated-declarations -static -nostdlib -L /usr/lib/diet/lib -lc -lm WFLAGS = -Wall -Wshadow -Wextra -Wno-unused-parameter -Wno-unused-label -Werror CFLAGS = -D _GNU_SOURCE -I ${ASCDIR} -ggdb3 $(WFLAGS) -Ofast -march=native -flto -DNDEBUG TRACE_LIBS = -ldl '-Wl,--whole-archive' -lasc -lssv '-Wl,--no-whole-archive' -lfann -lgsl -lgslcblas -lcrypto -lgmp -lm LDFLAGS = -L ${ASCDIR} .PHONY: all clean distclean all: trace RawLog.so hello # Actions RawLog.o: RawLog.c trace.h ${CC} -c RawLog.c -o $@ ${CFLAGS} RawLog.so: RawLog.o outraw.o ${CC} -fPIC -shared -o RawLog.so RawLog.o outraw.o trace: trace.o ${ASCDIR}/libasc.a ${CC} -rdynamic trace.o ${CFLAGS} ${LDFLAGS} ${TRACE_LIBS} -o $@ trace.o: trace.c trace.h ${CC} trace.c ${CFLAGS} -c outraw.o: outraw.c ${CC} outraw.c ${CFLAGS} -c ${ASCDIR}/libasc.a: .asc.dir make -C ${ASCDIR} .asc.dir: git clone git@github.com:PSML/asc.git ${ASCDIR} touch .asc.dir hello: hello.c ${CC} ${APP_CFLAGS} hello.c -o hello clean: ${RM} -rf $(wildcard *.o *.so *~ *.trc hello trace) distclean: clean ${RM} -rf $(wildcard .*.dir ${ASCDIR} )