summary refs log blame commit diff stats
path: root/c/nucleotide-count/makefile
blob: f34535afd3f368f0f29d88830b33498cdd57593b (plain) (tree)




































                                                                                                  
### If you wish to use extra libraries (math.h for instance),
### add their flags here (-lm in our case) in the "LIBS" variable.

LIBS = -lm

###
CFLAGS  = -std=c99
CFLAGS += -g
CFLAGS += -Wall
CFLAGS += -Wextra
CFLAGS += -pedantic
CFLAGS += -Werror
CFLAGS += -Wmissing-declarations
CFLAGS += -DUNITY_SUPPORT_64

ASANFLAGS  = -fsanitize=address
ASANFLAGS += -fno-common
ASANFLAGS += -fno-omit-frame-pointer

.PHONY: test
test: tests.out
	@./tests.out

.PHONY: memcheck
memcheck: test/*.c src/*.c src/*.h
	@echo Compiling $@
	@$(CC) $(ASANFLAGS) $(CFLAGS) src/*.c test/vendor/unity.c test/*.c -o memcheck.out $(LIBS)
	@./memcheck.out
	@echo "Memory check passed"

.PHONY: clean
clean:
	rm -rf *.o *.out *.out.dSYM

tests.out: test/*.c src/*.c src/*.h
	@echo Compiling $@
	@$(CC) $(CFLAGS) src/*.c test/vendor/unity.c test/*.c -o tests.out $(LIBS)
="w"> tmp_linux/syslinux-*/bios/core/isolinux.bin \ tmp_linux/syslinux-*/bios/com32/elflink/ldlinux/ldlinux.c32 \ tmp_linux/isoimage/boot/syslinux echo "=== generating mu_linux.iso" # 'hybrid' ISO can also be used on non-optical media such as a disk or USB stick xorriso -as mkisofs \ -isohybrid-mbr tmp_linux/syslinux-*/bios/mbr/isohdpfx.bin \ -c boot/syslinux/boot.cat \ -b boot/syslinux/isolinux.bin \ -no-emul-boot \ -boot-load-size 4 \ -boot-info-table \ tmp_linux/isoimage -o mu_linux.iso