BlinkenArea - GitList
Repositories
Blog
Wiki
dxfngc
Code
Commits
Branches
Tags
Search
Tree:
be85cfc
Branches
Tags
master
dxfngc
Makefile
initial version, DXFs can be read, some G-code can be produced
Stefan Schuermans
commited
be85cfc
at 2013-01-20 20:53:53
Makefile
Blame
History
Raw
# drawing (DXF) to gcode (NGC) converter # Copyright 2013 Stefan Schuermans <stefan@schuermans.info> # Copyleft: CC-BY-SA http://creativecommons.org/licenses/by-sa/3.0/ TARGET=dxfngc SRCS=$(wildcard src/*.cpp) CFLAGS=-Wall -Wextra -Werror -O3 DEFINES= INCLUDES= LDFLAGS= LIBS=-lm -ldime CPP=g++ CPPARGS=$(CFLAGS) $(DEFINES) $(INCLUDES) SRCS_BASE=$(patsubst src/%.cpp,%,$(SRCS)) DEPS=$(addprefix dep/,$(addsuffix .d,$(SRCS_BASE))) OBJS=$(addprefix obj/,$(addsuffix .o,$(SRCS_BASE))) .PHONY: all clean .SECONDARY: .SUFFIXES: all: dep/deps $(TARGET) ifneq ($(MAKECMDGOALS),clean) include dep/deps endif dep: mkdir -p $@ dep/deps: $(DEPS) | dep cat /dev/null $^ >$@ dep/%.d: src/%.cpp Makefile | dep $(CPP) $(CPPARGS) -M -MT$(patsubst src/%.cpp,obj/%.o,$<) -o $@ $< obj: mkdir -p $@ obj/%.o: src/%.cpp Makefile | obj $(CPP) $(CPPARGS) -c -o $@ $< $(TARGET): $(OBJS) $(CPP) $(LDFLAGS) -o $@ $^ $(LIBS) clean: rm -rf dep obj $(TARGET)