Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NASM = nasm
- ASMFLAGS += -g -f elf32
- CFLAGS ?= -O2 -g
- CFLAGS += -std=gnu99
- CFLAGS += -Wall -Werror -Wformat-security -Wignored-qualifiers -Winit-self \
- -Wswitch-default -Wpointer-arith -Wtype-limits -Wempty-body \
- -Wstrict-prototypes -Wold-style-declaration -Wold-style-definition \
- -Wmissing-parameter-type -Wmissing-field-initializers -Wnested-externs \
- -Wstack-usage=4096 -Wmissing-prototypes -Wfloat-equal -Wabsolute-value
- CFLAGS += -fsanitize=undefined -fsanitize-undefined-trap-on-error
- CC += -m32 -no-pie -fno-pie
- LDLIBS = -lm
- .PHONY: all clean test
- all: integral
- integral: integral.c funcs.o
- $(CC) $(CFLAGS) -o $@ $^ $(LDLIBS)
- funcs.o: funcs.asm
- $(NASM) $(ASMFLAGS) $< -o $@
- test: all
- ./integral --test-root 1:2:1.9:2:0.0000001:1.956152
- ./integral --test-root 1:3:-0.3:-0.2:0.0000001:-0.203334
- ./integral --test-root 2:3:0.1:0.2:0.0000001:0.187411
- ./integral --test-integral 1:0:2:0.00001:4.712388
- ./integral --test-integral 2:0:2:0.00001:2.399529
- ./integral --test-integral 3:0:2:0.00001:0.864664
- clean:
- rm -rf *.o
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement