-
-
Notifications
You must be signed in to change notification settings - Fork 402
/
Makefile
52 lines (36 loc) · 1.33 KB
/
Makefile
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
LIBNAME = scalene
PYTHON = python3
PYTHON_SOURCES = scalene/[a-z]*.py
C_SOURCES = src/source/get_line_atomic.cpp src/include/*.h* # src/source/libscalene.cpp
CXXFLAGS = /Ox /DNDEBUG /std:c++14 /Zi
CXX = cl
MAIN_INCLUDES = -Isrc -Isrc/include
INCLUDES = $(MAIN_INCLUDES) -Ivendor/Heap-Layers -Ivendor/Heap-Layers/wrappers -Ivendor/Heap-Layers/utility -Ivendor/printf
LIBFILE = lib$(LIBNAME).dll
WRAPPER = # vendor/Heap-Layers/wrappers/gnuwrapper.cpp
SRC = src/source/lib$(LIBNAME).cpp $(WRAPPER) vendor/printf/printf.cpp
all: # vendor-deps $(SRC) $(OTHER_DEPS)
# $(CXX) $(CXXFLAGS) $(INCLUDES) $(SRC) /o $(LIBFILE)
mypy:
-mypy $(PYTHON_SOURCES)
format: black isort clang-format
clang-format:
-clang-format -i $(C_SOURCES) --style=google
isort:
-isort $(PYTHON_SOURCES)
black:
-black -l 79 $(PYTHON_SOURCES)
vendor/Heap-Layers:
cd vendor && git clone https://github.com/emeryberger/Heap-Layers
vendor/printf/printf.cpp:
cd vendor && git clone https://github.com/mpaland/printf
cd vendor\printf && copy printf.c printf.cpp
vendor-deps: clear-vendor-dirs vendor/Heap-Layers vendor/printf/printf.cpp
clear-vendor-dirs:
if exist vendor\ (rmdir /Q /S vendor)
mkdir vendor
pkg: vendor/Heap-Layers vendor/printf/printf.cpp
-rm -rf dist build *egg-info
$(PYTHON) setup.py sdist bdist_wheel
upload: pkg # to pypi
$(PYTHON) -m twine upload dist/*