1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- # ANSI C conformance
- CFLAGS += -ansi -pedantic-errors -Werror=pedantic -fno-asm -fno-common
- # Optimization
- CFLAGS += -O3
- # 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
- include dylib.make
- all: $(DYLIB) demo/demo
- $(DYLIB): $(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) $(DYLIB)
- make -C demo clean
- .PHONY: demo/demo
- demo/demo: $(DYLIB)
- make -C demo demo
- .PHONY: test
- test: demo/demo
- make -C data test
|