put /local/rnd/CFLAGS cc/cflags
append /local/rnd/LDFLAGS cc/ldflags

print [@
ROOT=../..
PLUGDIR=../../src_plugins
LIBRND_SHAREDIR=@/local/pcb/librnd_prefix@/share/librnd4

include $(LIBRND_SHAREDIR)/librnd.mak

CFLAGS=@/local/pcb/c89flags@ @/local/rnd/CFLAGS@
LDFLAGS=
CC=@cc/cc@
@]


print [@

OBJS = \
 gsch2pcb.o

all: gsch2pcb-rnd$(LIBRND_EXE)

gsch2pcb-rnd$(LIBRND_EXE): $(OBJS)  $(QPARSE) $(FP_OBJS)
	$(CC) $(OBJS) -o gsch2pcb-rnd$(LIBRND_EXE) $(LDFLAGS)

gsch2pcb.o: gsch2pcb.c
	$(CC) -c $(CFLAGS) gsch2pcb.c -o gsch2pcb.o

install_all:
	$(SCCBOX) mkdir -p "$(BINDIR)" "$(LIBDIR)"
	$(SCCBOX) $(HOW) "gsch2pcb-rnd$(LIBRND_EXE)" "$(BINDIR)/gsch2pcb-rnd$(LIBRND_EXE)"

install:
	$(MAKE) install_all HOW="install"

linstall:
	$(MAKE) install_all HOW="linstall -f"

uninstall:
	$(MAKE) install_all HOW="uninstall"

clean:
	$(SCCBOX) rm -f -q gsch2pcb-rnd$(LIBRND_EXE) $(OBJS)

distclean: clean

include $(ROOT)/Makefile.conf

@]
