summaryrefslogtreecommitdiff
path: root/runtime/Makefile
blob: 5ed24af095c966f1303e98bbc5565527ddc9e907 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
include ../Makefile.config

CFLAGS=-O1 -g -Wall
INCLUDES=
OBJS=int64.o
LIB=libcompcert.a

all: $(LIB) $(INCLUDES)

$(LIB): $(OBJS)
	rm -f $(LIB)
	ar rcs $(LIB) $(OBJS)

%.o: $(ARCH)/%.s
	$(CASMRUNTIME) $^

clean::
	rm -f *.o $(LIB)

install:
	install -d $(LIBDIR)
	install -c $(LIB) $(INCLUDES) $(LIBDIR)

test/test_int64: test/test_int64.c $(LIB)
	$(CC) -o $@ test/test_int64.c $(LIB)

clean::
	rm -f test/test_int64

.PHONY: test

test: FORCE test/test_int64
	test/test_int64

FORCE: