Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[mce] Update maintenance related make rules
New types confuse cproto. Workaround the issue with macros.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Jun 12, 2020
1 parent 1bebd33 commit ee3ec80
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Makefile
Expand Up @@ -688,10 +688,24 @@ endif

.SUFFIXES: .q .p .g

%.q : %.c ; $(CC) -o $@ -E $< $(CPPFLAGS) $(MCE_CFLAGS)
PROTO_CPPFLAGS += $(CPPFLAGS)
PROTO_CPPFLAGS += $(MCE_CFLAGS)
PROTO_CPPFLAGS += $(MODULE_CFLAGS)
PROTO_CPPFLAGS += -D_Float32=float
PROTO_CPPFLAGS += -D_Float64=double
PROTO_CPPFLAGS += -D_Float128="long double"
PROTO_CPPFLAGS += -D_Float32x=float
PROTO_CPPFLAGS += -D_Float64x=double
PROTO_CPPFLAGS += -D_Float128x="long double"

%.q : %.c ; $(CC) -o $@ -E $< $(PROTO_CPPFLAGS)
%.p : %.q ; cproto -s < $< | prettyproto.py | tee $@
%.g : %.q ; cproto < $< | prettyproto.py | tee $@

protos-q: $(patsubst %.c,%.q,$(wildcard *.c modules/*.c))
protos-p: $(patsubst %.c,%.p,$(wildcard *.c modules/*.c))
protos-g: $(patsubst %.c,%.g,$(wildcard *.c modules/*.c))

clean::
$(RM) -f *.[qpg] modules/*.[qpg] tools/*.[qpg]

Expand Down

0 comments on commit ee3ec80

Please sign in to comment.