mbed os with nrf51 internal bandgap enabled to read battery level

Dependents:   BLE_file_test BLE_Blink ExternalEncoder

Committer:
elessair
Date:
Sun Oct 23 15:10:02 2016 +0000
Revision:
0:f269e3021894
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
elessair 0:f269e3021894 1 TARGET = libequeue.a
elessair 0:f269e3021894 2
elessair 0:f269e3021894 3 CC = gcc
elessair 0:f269e3021894 4 AR = ar
elessair 0:f269e3021894 5 SIZE = size
elessair 0:f269e3021894 6
elessair 0:f269e3021894 7 SRC += $(wildcard *.c)
elessair 0:f269e3021894 8 OBJ := $(SRC:.c=.o)
elessair 0:f269e3021894 9 DEP := $(SRC:.c=.d)
elessair 0:f269e3021894 10 ASM := $(SRC:.c=.s)
elessair 0:f269e3021894 11
elessair 0:f269e3021894 12 ifdef DEBUG
elessair 0:f269e3021894 13 CFLAGS += -O0 -g3
elessair 0:f269e3021894 14 else
elessair 0:f269e3021894 15 CFLAGS += -O2
elessair 0:f269e3021894 16 endif
elessair 0:f269e3021894 17 ifdef WORD
elessair 0:f269e3021894 18 CFLAGS += -m$(WORD)
elessair 0:f269e3021894 19 endif
elessair 0:f269e3021894 20 CFLAGS += -I.
elessair 0:f269e3021894 21 CFLAGS += -std=c99
elessair 0:f269e3021894 22 CFLAGS += -Wall
elessair 0:f269e3021894 23 CFLAGS += -D_XOPEN_SOURCE=600
elessair 0:f269e3021894 24
elessair 0:f269e3021894 25 LFLAGS += -pthread
elessair 0:f269e3021894 26
elessair 0:f269e3021894 27
elessair 0:f269e3021894 28 all: $(TARGET)
elessair 0:f269e3021894 29
elessair 0:f269e3021894 30 test: tests/tests.o $(OBJ)
elessair 0:f269e3021894 31 $(CC) $(CFLAGS) $^ $(LFLAGS) -o tests/tests
elessair 0:f269e3021894 32 tests/tests
elessair 0:f269e3021894 33
elessair 0:f269e3021894 34 prof: tests/prof.o $(OBJ)
elessair 0:f269e3021894 35 $(CC) $(CFLAGS) $^ $(LFLAGS) -o tests/prof
elessair 0:f269e3021894 36 tests/prof
elessair 0:f269e3021894 37
elessair 0:f269e3021894 38 asm: $(ASM)
elessair 0:f269e3021894 39
elessair 0:f269e3021894 40 size: $(OBJ)
elessair 0:f269e3021894 41 $(SIZE) -t $^
elessair 0:f269e3021894 42
elessair 0:f269e3021894 43 -include $(DEP)
elessair 0:f269e3021894 44
elessair 0:f269e3021894 45 %.a: $(OBJ)
elessair 0:f269e3021894 46 $(AR) rcs $@ $^
elessair 0:f269e3021894 47
elessair 0:f269e3021894 48 %.o: %.c
elessair 0:f269e3021894 49 $(CC) -c -MMD $(CFLAGS) $< -o $@
elessair 0:f269e3021894 50
elessair 0:f269e3021894 51 %.s: %.c
elessair 0:f269e3021894 52 $(CC) -S $(CFLAGS) $< -o $@
elessair 0:f269e3021894 53
elessair 0:f269e3021894 54 clean:
elessair 0:f269e3021894 55 rm -f $(TARGET)
elessair 0:f269e3021894 56 rm -f tests/tests tests/tests.o tests/tests.d
elessair 0:f269e3021894 57 rm -f tests/prof tests/prof.o tests/prof.d
elessair 0:f269e3021894 58 rm -f $(OBJ)
elessair 0:f269e3021894 59 rm -f $(DEP)
elessair 0:f269e3021894 60 rm -f $(ASM)