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 4:5:0:3:0.0000001:1.000000
- ./integral --test-root 4:6:1:4:0.0000001:2.000000
- ./integral --test-root 5:6:0:1:0.0000001:0.5
- ./integral --test-integral 4:-2:2:0.00001:10.666666
- ./integral --test-integral 6:-0.5:2:0.00001:6.250000
- ./integral --test-integral 7:0.5:3:0.00001:20.234375
- clean:
- rm -rf *.o
Add Comment
Please, Sign In to add comment