diff --git a/examples/ec/Makefile b/examples/ec/Makefile new file mode 100644 index 0000000..92be1e6 --- /dev/null +++ b/examples/ec/Makefile @@ -0,0 +1,24 @@ +# Build examples from installed lib + +include Makefile.am + +incdir = $(shell pkg-config --variable=includedir libisal) + +CFLAGS += -include $(incdir)/isa-l.h # Add standard header +CFLAGS += -I $(incdir)/isa-l # Add path to remove error +LDFLAGS = $(shell pkg-config --libs libisal) + +progs = $(notdir $(examples)) + +ex: $(progs) +run: $(addsuffix .run,$(progs)) + +$(progs): % : %.c + $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) + +$(addsuffix .run,$(progs)): %.run : % + ./$< + @echo Completed run: $< + +clean: + $(RM) $(progs) diff --git a/examples/ec/Makefile.unx b/examples/ec/Makefile.unx deleted file mode 100644 index b04cfdf..0000000 --- a/examples/ec/Makefile.unx +++ /dev/null @@ -1,8 +0,0 @@ - -default: ex - -include ../../erasure_code/Makefile.am -include Makefile.am -include ../../make.inc - -VPATH = . ../../erasure_code ../../include