CC = gcc
CFLAGS = -Wall
BINS = create-installer

all: $(BINS)

create-installer: create-installer.in create-installer.funcs rewrite-path.c
	sed '/@@CREATEINSTALLERFUNCS@@/r create-installer.funcs' create-installer.in | sed '/@@REWRITEPATHSRC@@/r rewrite-path.c' | sed 's/@@CREATEINSTALLERFUNCS@@//g;s/@@REWRITEPATHSRC@@//g' > create-installer
	chmod 755 create-installer

rewrite-path: rewrite-path.o
rewrite-path.o: rewrite-path.c

clean:
	rm -f rewrite-path.o rewrite-path $(BINS)

distclean: clean

.PHONY: all clean distclean
