summaryrefslogtreecommitdiffstats
path: root/example/Makefile
blob: 0f08f2d7aa477ff874885cb17b3c31b89e144f2f (plain)
1
2
3
4
5
6
7
8
9
10
11
CFLAGS=-ansi -Wall -Werror -I .. -g -O0
DEPS=../pb_decode.c ../pb_decode.h ../pb_encode.c ../pb_encode.h ../pb.h

all: server

%: %.c $(DEPS) fileproto.h
	$(CC) $(CFLAGS) -o $@ $< ../pb_decode.c ../pb_encode.c fileproto.c

fileproto.h: fileproto.proto ../generator/nanopb_generator.py
	protoc -I. -I../generator -I/usr/include -ofileproto.pb $<
	python ../generator/nanopb_generator.py fileproto.pb