aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/pcre2-10.32/Makefile
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-04-06 20:27:06 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-04-06 20:27:06 +0200
commit25d1f635c42f59f9f076ef137fe6bf277a396d6f (patch)
tree932200f8bcb9bfd68caf8df03dfb2590bcd4ac21 /test/monniaux/pcre2-10.32/Makefile
parent4ddd71912c27ac88f4a2c82c0aa5046253923adb (diff)
downloadcompcert-kvx-25d1f635c42f59f9f076ef137fe6bf277a396d6f.tar.gz
compcert-kvx-25d1f635c42f59f9f076ef137fe6bf277a396d6f.zip
makefile for PCRE2
Diffstat (limited to 'test/monniaux/pcre2-10.32/Makefile')
-rw-r--r--test/monniaux/pcre2-10.32/Makefile25
1 files changed, 20 insertions, 5 deletions
diff --git a/test/monniaux/pcre2-10.32/Makefile b/test/monniaux/pcre2-10.32/Makefile
index 317819ae..b905f849 100644
--- a/test/monniaux/pcre2-10.32/Makefile
+++ b/test/monniaux/pcre2-10.32/Makefile
@@ -1,5 +1,8 @@
-CC=../../../ccomp
-CFLAGS=-O3 -Wall
+all: pcre2test.gcc.k1c pcre2test.ccomp.k1c
+
+ALL_CFLAGS = -DHAVE_CONFIG_H -DPCRE2_CODE_UNIT_WIDTH=8
+
+include ../rules.mk
CFILES = \
pcre2_auto_possess.c \
@@ -35,7 +38,19 @@ CFILES = \
HFILES = config.h pcre2_internal.h pcre2posix.h \
pcre2.h pcre2_intmodedep.h pcre2_ucp.h
-CFLAGS += -DHAVE_CONFIG_H
-pcre2test: $(CFILES) $(HFILES)
- $(CC) $(CFLAGS) -o $@ -DPCRE2_CODE_UNIT_WIDTH=8 $(CFILES)
+K1C_GCC_OFILES=$(CFILES:.c=.gcc.k1c.o)
+K1C_CCOMP_OFILES=$(CFILES:.c=.ccomp.k1c.o)
+
+$(K1C_GCC_OFILES) $(K1C_CCOMP_OFILES): $(HFILES)
+
+pcre2test.gcc.k1c: $(K1C_GCC_OFILES)
+ $(K1C_CC) $(K1C_CFLAGS) -o $@ $+
+
+pcre2test.ccomp.k1c: $(K1C_CCOMP_OFILES)
+ $(K1C_CCOMP) $(K1C_CCOMPFLAGS) -o $@ $+
+
+.PHONY: clean
+
+clean:
+ rm -f *.s *.o *.k1c