summaryrefslogtreecommitdiff
path: root/Makefile
blob: e79630b1d75b16dc158f76291f1f7b58167b2d93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

.PHONY: all clean
CC=gcc
CXX=g++
CFLAGS=-std=c99
CPPFLAGS=-O3 -Wall -Wextra -pedantic -g -DUPB_UNALIGNED_READS_OK -fomit-frame-pointer -Idescriptor -Isrc
OBJ=src/upb_parse.o src/upb_table.o src/upb_msg.o src/upb_enum.o src/upb_context.o \
    src/upb_string.o descriptor/descriptor.o
ALL=$(OBJ) src/libupb.a tests/test_table tests/tests tools/upbc
all: $(ALL)
clean:
	rm -f $(ALL) deps

src/libupb.a: $(OBJ)
	ar rcs src/libupb.a $(OBJ)
tests/test_table: src/libupb.a
tools/upbc: src/libupb.a
benchmark/benchmark: src/libupb.a -lm

-include deps
deps: src/*.c src/*.h descriptor/*.c descriptor/*.h tests/*.c tests/*.h tools/*.c tools/*.h
	gcc -MM *.c > deps
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback