Sha256: 2900afc15de2042af813fa7509bb973f0a918f0b236ce20066d7166f41f06cd2

Contents?: true

Size: 1.89 KB

Versions: 2

Compression:

Stored size: 1.89 KB

Contents

CC = gcc
LD = gcc

CONFIGURE_CFLAGS = -I.. -Wall -Wextra -std=c11 -pedantic -O2 -g
NDT_CFLAGS = $(strip $(CONFIGURE_CFLAGS) $(CFLAGS))
NDT_CFLAGS_SHARED = $(NDT_CFLAGS) -fPIC

CONFIGURE_COV_CFLAGS = -I.. -Wall -Wextra -std=c11 -pedantic -O0 -g -fno-inline -fprofile-arcs -ftest-coverage
ifeq ($(MAKECMDGOALS), coverage)
  NDT_CFLAGS = $(strip $(CONFIGURE_COV_CFLAGS) $(CFLAGS))
endif


OBJS = bpgrammar.o bplexer.o import.o export.o
SHARED_OBJS = .objs/bpgrammar.o .objs/bplexer.o .objs/import.o .objs/export.o


default: $(OBJS) $(SHARED_OBJS)


bpgrammar.o:\
Makefile bpgrammar.c bpgrammar.h bplexer.h ../ndtypes.h ../seq.h
	$(CC) $(NDT_CFLAGS) -c bpgrammar.c

.objs/bpgrammar.o:\
Makefile bpgrammar.c bpgrammar.h bplexer.h ../ndtypes.h ../seq.h
	$(CC) $(NDT_CFLAGS_SHARED) -c bpgrammar.c -o .objs/bpgrammar.o

bplexer.o:\
Makefile bplexer.c bpgrammar.h bplexer.h
	$(CC) $(NDT_CFLAGS) -c bplexer.c

.objs/bplexer.o:\
Makefile bplexer.c bpgrammar.h bplexer.h
	$(CC) $(NDT_CFLAGS_SHARED) -c bplexer.c -o .objs/bplexer.o

import.o:\
Makefile import.c bpgrammar.h bplexer.h ../ndtypes.h ../seq.h
	$(CC) $(NDT_CFLAGS) -c import.c

.objs/import.o:\
Makefile import.c bpgrammar.h bplexer.h ../ndtypes.h ../seq.h
	$(CC) $(NDT_CFLAGS_SHARED) -c import.c -o .objs/import.o

export.o:\
Makefile export.c bpgrammar.h bplexer.h ../ndtypes.h ../seq.h
	$(CC) $(NDT_CFLAGS) -c export.c

.objs/export.o:\
Makefile export.c bpgrammar.h bplexer.h ../ndtypes.h ../seq.h
	$(CC) $(NDT_CFLAGS_SHARED) -c export.c -o .objs/export.o


# Without these, GNU make automatically builds the parser.
%.c: %.y
%.c: %.l

parser: FORCE
	bison -Wall -o bpgrammar.c -pndt_bp --defines=bpgrammar.h bpgrammar.y
	flex -o bplexer.c -Pndt_bp --header-file=bplexer.h bplexer.l


FORCE:

clean: FORCE
	rm -f *.o *.so *.gch *.gcda *.gcno *.gcov *.dyn *.dpi *.lock
	cd .objs && rm -f *.o *.so *.gch *.gcda *.gcno *.gcov *.dyn *.dpi *.lock

distclean: clean
	rm -f Makefile


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ndtypes-0.2.0dev8 ext/ruby_ndtypes/ndtypes/libndtypes/compat/Makefile
ndtypes-0.2.0dev6 ext/ruby_ndtypes/ndtypes/libndtypes/compat/Makefile