1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-09 22:12:48 +02:00
eda-tools/sch2fig/Makefile

60 lines
1.3 KiB
Makefile
Raw Normal View History

#
# Makefile - build sch2fig
#
# Written 2016 by Werner Almesberger
# Copyright 2016 by Werner Almesberger
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
NAME = sch2fig
2016-07-23 20:59:37 +03:00
OBJS = main.o sch.o lib.o fig.o text.o misc.o
CFLAGS = -g -Wall -Wextra -Wno-unused-parameter -Wshadow
LIBS = -lm
include ../common/Makefile.c-common
.PHONY: test neo900 test diff view newref
all:: $(NAME)
$(NAME): $(OBJS)
$(CC) -o $(NAME) $(OBJS) $(LIBS)
NEO900_HW = ../../../n9/ee/hw
KICAD_LIBS = ../../kicad-libs/components
2016-07-23 20:59:37 +03:00
sch:
eeschema test.sch
test: $(NAME)
./$(NAME) test.lib test.sch >out.fig
SHEET ?= 12
neo900: $(NAME)
./$(NAME) $(NEO900_HW)/neo900.lib \
$(KICAD_LIBS)/powered.lib \
$(NEO900_HW)/neo900_SS_$(SHEET).sch \
>out.fig
neo900.pdf: $(NAME) sch2pdf neo900-template.fig
./sch2pdf -o $@ -t neo900-template.fig \
$(NEO900_HW)/neo900.lib $(KICAD_LIBS)/powered.lib \
$(NEO900_HW)/neo900.sch
diff: $(NAME)
test/genpng test out
test/comp test || $(MAKE) view
view:
qiv -t -R -D `echo test/_diff*.png | \
sed 's/\([^ ]*\)_diff\([^ ]*\)/\1_diff\2 \1ref\2 \1out\2/g'`
newref:
test/genpng test ref