prefix=/usr/local
libexecdir=${prefix}/libexec
sysconfdir=${prefix}/etc
datadir=${prefix}/share

xsetup-mol:
	@echo "make is not necessary. type make install."

install:
	install -D -m 755 mkxf86config.sh $(DESTDIR)$(libexecdir)/xsetup-mol
	install -D -m 644 XF86Config-4.in $(DESTDIR)$(datadir)/mol/replace/XF86Config-4.in
	install -D -m 644 XF86Config.in $(DESTDIR)$(datadir)/mol/replace/XF86Config.in
	install -D -m 644 xorg.conf.in $(DESTDIR)$(datadir)/mol/replace/xorg.conf.in
	install -d -m 755 $(DESTDIR)$(sysconfdir)/mol/molmake.conf.d
	echo "XSETUP=\"$(libexecdir)/xsetup-mol\"" > $(DESTDIR)$(sysconfdir)/mol/molmake.conf.d/xsetup.conf

uninstall:
	rm -f $(DESTDIR)$(libexecdir)/xsetup-mol
	rm -f $(DESTDIR)$(datadir)/mol/replace/XF86Config-4.in
	rm -f $(DESTDIR)$(datadir)/mol/replace/XF86Config.in
	rm -f $(DESTDIR)$(datadir)/mol/replace/xorg.conf.in
	rm -f $(DESTDIR)$(sysconfdir)/mol/molmake.conf.d/xsetup.conf

clean:
	@echo "clean is not necessary."

