-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (29 loc) · 746 Bytes
/
Makefile
File metadata and controls
40 lines (29 loc) · 746 Bytes
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
36
37
38
39
40
CC = gcc
CXX = g++
FLAGS = -Ilib -Itest -O2 -Wall -g
CFLAGS = -std=c99 $(FLAGS)
CXXFLAGS = -std=c++11 $(FLAGS)
LIB_TARGET = lib/libbfp.a
LIB_OBJ = lib/posit.o lib/pack.o lib/util.o lib/op1.o lib/op2.o
TEST_TARGET = test/bfptest
TEST_OBJ = test/test.o test/p2_test.o test/p3_test.o test/ieee_test.o \
test/CuTest.o $(LIB_TARGET)
TARGET = bfp
OBJ = main.o $(LIB_TARGET)
all: $(TARGET) $(TEST_TARGET)
test: $(TEST_TARGET)
./test/bfptest
clean:
rm -f lib/*.o $(LIB_TARGET)
rm -f test/*.o $(TEST_TARGET)
rm -f *.o $(TARGET)
$(LIB_TARGET): $(LIB_OBJ)
ar rcs $@ $^
$(TEST_TARGET): $(TEST_OBJ)
$(CXX) -o $@ $^
$(TARGET): $(OBJ)
$(CXX) -o $@ $^
%.o: %.cpp
$(CXX) -o $@ $(CXXFLAGS) -c $^
%.o: %.c
$(CC) -o $@ $(CFLAGS) -c $^