+# SPDX-License-Identifier: GPL-2.0
+include ../config.mk
+
DISTGEN = maketable normal pareto paretonormal
DISTDATA = normal.dist pareto.dist paretonormal.dist experimental.dist
HOSTCC ?= $(CC)
-LDLIBS += -lm
+CCOPTS = $(CBUILD_CFLAGS)
+LDLIBS += -lm
all: $(DISTGEN) $(DISTDATA)
$(DISTGEN):
- $(HOSTCC) -Wall -O1 -I../include -o $@ $@.c -lm
+ $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
%.dist: %
./$* > $@
experimental.dist: maketable experimental.dat
./maketable experimental.dat > experimental.dist
+stats: stats.c
+ $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+
install: all
- mkdir -p $(DESTDIR)/usr/lib/tc
+ mkdir -p $(DESTDIR)$(LIBDIR)/tc
for i in $(DISTDATA); \
- do install -m 755 $$i $(DESTDIR)/usr/lib/tc; \
+ do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
done
clean: