2021-07-22 12:35:02 +02:00
|
|
|
CFLAGS=-fPIC
|
2021-09-28 19:21:22 +02:00
|
|
|
CFLAGS+=-std=c11 -pedantic -Werror -Wformat
|
2021-07-19 15:11:41 +02:00
|
|
|
|
2021-09-28 15:17:38 +02:00
|
|
|
# Debug flags
|
|
|
|
#CFLAGS+=-fsanitize=address
|
|
|
|
#LDFLAGS+=-fsanitize=address
|
|
|
|
#CFLAGS+=-g -O0
|
|
|
|
#CFLAGS+=-DENABLE_DEBUG
|
|
|
|
#CFLAGS+=-fno-omit-frame-pointer
|
|
|
|
|
|
|
|
# Performance flags
|
|
|
|
CFLAGS+=-O3
|
|
|
|
CFLAGS+=-fstack-protector-explicit
|
|
|
|
CFLAGS+=-flto
|
2021-07-19 15:11:41 +02:00
|
|
|
|
2021-08-02 20:02:40 +02:00
|
|
|
BIN=dump test_speed ovni2prv emu libovni.so ovnisync
|
2021-07-19 15:11:41 +02:00
|
|
|
|
|
|
|
all: $(BIN)
|
|
|
|
|
|
|
|
libovni.a: ovni.o
|
|
|
|
ar -crs $@ $^
|
|
|
|
|
2021-08-03 17:48:37 +02:00
|
|
|
dump: ovni.o dump.o parson.o
|
2021-07-19 15:11:41 +02:00
|
|
|
|
2021-08-03 17:48:37 +02:00
|
|
|
test_speed: test_speed.c ovni.o parson.o
|
2021-07-22 12:35:02 +02:00
|
|
|
|
2021-10-11 17:29:45 +02:00
|
|
|
emu: emu.o emu_ovni.o emu_nosv.o emu_nosv_ss.o emu_tampi.o ovni.o prv.o pcf.o parson.o chan.o
|
2021-08-02 12:34:11 +02:00
|
|
|
|
2021-08-03 17:48:37 +02:00
|
|
|
libovni.so: ovni.o parson.o
|
2021-08-02 12:34:11 +02:00
|
|
|
$(LINK.c) -shared $^ -o $@
|
2021-07-24 10:53:41 +02:00
|
|
|
|
2021-08-03 17:48:37 +02:00
|
|
|
ovni2prv: ovni2prv.c ovni.o parson.o
|
2021-07-24 10:53:41 +02:00
|
|
|
|
2021-08-02 20:02:40 +02:00
|
|
|
ovnisync: ovnisync.c
|
2021-09-28 15:17:38 +02:00
|
|
|
mpicc $(CFLAGS) $(LDFLAGS) -lm $^ -o $@
|
2021-08-02 20:02:40 +02:00
|
|
|
|
2021-07-19 15:11:41 +02:00
|
|
|
clean:
|
|
|
|
rm -f *.o $(BIN)
|