Rename some internal functions to have unique names
[apps/agl-service-can-low-level.git] / examples / network_server / Makefile
1 CFLAGS = -ansi -Wall -Werror -g -O0
2
3 # Path to the nanopb root folder
4 NANOPB_DIR = ../..
5 DEPS = $(NANOPB_DIR)/pb_decode.c $(NANOPB_DIR)/pb_decode.h \
6        $(NANOPB_DIR)/pb_encode.c $(NANOPB_DIR)/pb_encode.h $(NANOPB_DIR)/pb.h
7 CFLAGS += -I$(NANOPB_DIR)
8
9 all: server client
10
11 clean:
12         rm -f server client fileproto.pb.c fileproto.pb.h
13
14 %: %.c $(DEPS) fileproto.pb.h fileproto.pb.c
15         $(CC) $(CFLAGS) -o $@ $< $(NANOPB_DIR)/pb_decode.c $(NANOPB_DIR)/pb_encode.c fileproto.pb.c common.c
16
17 fileproto.pb.c fileproto.pb.h: fileproto.proto $(NANOPB_DIR)/generator/nanopb_generator.py
18         protoc -ofileproto.pb $<
19         python $(NANOPB_DIR)/generator/nanopb_generator.py fileproto.pb