forked from davidcarne/DRCBotV2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
30 lines (21 loc) · 793 Bytes
/
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
SRCS=src/gerber_parse.cpp src/wrap/gerber_parse_wrap.cpp src/wrap/aperture_wrap.cpp \
src/util.cpp src/fileio.cpp src/macro_parser.cpp src/macro_vm.cpp \
src/gerb_script_util.cpp src/util_type.cpp src/gerbobj_line.cpp src/gerbobj_poly.cpp \
src/gcode_interp.cpp src/wrap/gerber_utils_wrap.cpp src/wrap/gcode_interp_wrap.cpp
OBJS=$(patsubst %.cpp,build/%.o, $(SRCS) )
OS = $(shell uname)
CPPFLAGS = `python-config --includes` -g -Isrc/ -Wall -Werror -Wno-unused
ifeq ($(OS),Darwin)
CPPFLAGS += -Wnewline-eof
endif
LDFLAGS = -lboost_python `python-config --ldflags`
_gerber_utils.so: $(OBJS)
@echo "LD $@"
@g++ $(LDFLAGS) $^ --shared -o $@
build/%.o: %.cpp
@echo "CXX $<"
@mkdir -p $(@D)
@g++ $(CPPFLAGS) -c -o $@ $<
.PHONY: clean
clean:
rm -rf build _gerber_utils.so