2016-07-22 06:04:42 +03:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
|
2016-07-22 05:54:32 +03:00
|
|
|
NAME = sch2fig
|
2016-07-23 20:59:37 +03:00
|
|
|
OBJS = main.o sch.o lib.o fig.o text.o misc.o
|
2016-07-22 05:54:32 +03:00
|
|
|
|
2016-07-24 07:05:41 +03:00
|
|
|
CFLAGS = -g -Wall -Wextra -Wno-unused-parameter -Wshadow
|
2016-07-23 12:58:21 +03:00
|
|
|
LIBS = -lm
|
2016-07-22 05:54:32 +03:00
|
|
|
|
2016-07-22 06:04:42 +03:00
|
|
|
include ../common/Makefile.c-common
|
2016-07-22 05:54:32 +03:00
|
|
|
|
2016-07-25 17:34:58 +03:00
|
|
|
.PHONY: test neo900
|
2016-07-22 05:54:32 +03:00
|
|
|
|
|
|
|
all:: $(NAME)
|
|
|
|
|
|
|
|
$(NAME): $(OBJS)
|
2016-07-23 12:58:21 +03:00
|
|
|
$(CC) -o $(NAME) $(OBJS) $(LIBS)
|
2016-07-22 05:54:32 +03:00
|
|
|
|
2016-07-22 06:16:14 +03:00
|
|
|
NEO900_HW = ../../../n9/ee/hw
|
|
|
|
KICAD_LIBS = ../../kicad-libs/components
|
2016-07-22 05:54:32 +03:00
|
|
|
|
2016-07-23 20:59:37 +03:00
|
|
|
sch:
|
|
|
|
eeschema test.sch
|
|
|
|
|
2016-07-22 05:54:32 +03:00
|
|
|
test: $(NAME)
|
2016-07-25 17:34:58 +03:00
|
|
|
./$(NAME) test.lib test.sch >out.fig
|
|
|
|
|
|
|
|
SHEET ?= 12
|
|
|
|
|
|
|
|
neo900: $(NAME)
|
2016-07-22 06:16:14 +03:00
|
|
|
./$(NAME) $(NEO900_HW)/neo900.lib \
|
|
|
|
$(KICAD_LIBS)/powered.lib \
|
2016-07-25 17:34:58 +03:00
|
|
|
$(NEO900_HW)/neo900_SS_$(SHEET).sch \
|
2016-07-22 05:54:32 +03:00
|
|
|
>out.fig
|
2016-07-25 23:42:50 +03:00
|
|
|
|
2016-07-26 08:34:56 +03:00
|
|
|
neo900.pdf: $(NAME) sch2pdf neo900-template.fig
|
|
|
|
./sch2pdf -o $@ -t neo900-template.fig \
|
2016-07-25 23:42:50 +03:00
|
|
|
$(NEO900_HW)/neo900.lib $(KICAD_LIBS)/powered.lib \
|
|
|
|
$(NEO900_HW)/neo900.sch
|