-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathmakefile
More file actions
57 lines (43 loc) · 1.15 KB
/
Copy pathmakefile
File metadata and controls
57 lines (43 loc) · 1.15 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
LIBDIR=./bin/
ifeq ($(OS),Windows_NT)
LIBNAME =$(LIBDIR)libseuif97.dll
LIBFLAGS=-static-libgcc -static -Wl,--add-stdcall-alias,--output-def=$(LIBDIR)libseuif97.def,-out-implib=$(LIBDIR)libseuif97.lib
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
LIBNAME =$(LIBDIR)libseuif97.so
endif
endif
CFLAGS=-O3 -march=native -funroll-loops
# __stdcall for Windows VBA X64
CFLAGS += -DBUILD_DLL
# __stdcall for Windows VBA X86
#CFLAGS += -DBUILD_DLL -m32
CC=gcc
INC =-I ./src/common \
-I ./src/algo \
-I ./src/r1 \
-I ./src/r2 \
-I ./src/r3 \
-I ./src/r4 \
-I ./src/r5
SRCS= ./src/algo/*.c \
./src/common/*.c \
./src/r1/*.c \
./src/r2/*.c \
./src/r3/*.c \
./src/r4/*.c \
./src/r5/*.c
all: $(LIBNAME)
$(LIBNAME): $(SRCS)
$(CC) -shared -o $@ -fPIC $(CFLAGS) $^ $(INC) $(LIBFLAGS)
tests:
$(MAKE) -C ./test/ FILE=test_hs.c
$(MAKE) -C ./test/ FILE=test_hxsx.c
$(MAKE) -C ./test/ FILE=test_ph.c
$(MAKE) -C ./test/ FILE=test_ps.c
$(MAKE) -C ./test/ FILE=test_pv.c
$(MAKE) -C ./test/ FILE=test_pt.c
$(MAKE) -C ./test/ FILE=test_th.c
$(MAKE) -C ./test/ FILE=test_ts.c
$(MAKE) -C ./test/ FILE=test_tv.c