1CC      ?= $(CROSS_COMPILE)gcc
2LD      ?= $(CROSS_COMPILE)ld
3AR      ?= $(CROSS_COMPILE)ar
4NM      ?= $(CROSS_COMPILE)nm
5OBJCOPY ?= $(CROSS_COMPILE)objcopy
6OBJDUMP ?= $(CROSS_COMPILE)objdump
7READELF ?= $(CROSS_COMPILE)readelf
8
9OBJS = main.o
10
11CFLAGS += -Wall -I../ta/include -I$(TEEC_EXPORT)/include -I./include
12#Add/link other required libraries here
13LDADD += -lteec -L$(TEEC_EXPORT)/lib
14
15BINARY = optee_example_hello_world
16
17.PHONY: all
18all: $(BINARY)
19
20$(BINARY): $(OBJS)
21	$(CC) $(LDFLAGS) -o $@ $< $(LDADD)
22
23.PHONY: clean
24clean:
25	rm -f $(OBJS) $(BINARY)
26
27%.o: %.c
28	$(CC) $(CFLAGS) -c $< -o $@
29