123456789101112131415161718192021222324252627282930313233343536373839404142 |
- # ANSI C conformance
- CFLAGS += -ansi -pedantic-errors -Werror=pedantic -fno-asm -fno-common
- # Optimization
- CFLAGS += -O3 -fipa-pta
- # Additional warnings
- CFLAGS += -Wall -Wextra
- # To build shared object
- CFLAGS += -fPIC
- OBJFILES := schmidt_trigger.o ringbuf.o monotonic_queue.o
- OBJFILES += jump_rope_count_device.o
- all: libjump.so demo/demo
- libjump.so: $(OBJFILES)
- cc -o $@ -shared $^
- schmidt_trigger.o: schmidt_trigger.c schmidt_trigger.h
- ringbuf.o: ringbuf.c ringbuf.h
- monotonic_queue.o: monotonic_queue.c monotonic_queue.h
- jump_rope_count_device.o: jump_rope_count_device.c \
- jump_rope_count_device.h monotonic_queue.h ringbuf.h schmidt_trigger.h
- .PHONY: clean
- clean:
- rm -v -f $(OBJFILES) libjump.so
- make -C demo clean
- .PHONY: demo/demo
- demo/demo: libjump.so
- make -C demo demo
- .PHONY: test
- test: demo/demo
- make -C data test
|