shithub: pc

ref: 7574756e466fd373beac9fa5cc96936b395eb83f
dir: /Makefile/

View raw version
TARGET = pc
PREFIX ?= /usr/local
CFLAGS ?= -O2 -Iinclude -Wno-incompatible-pointer-types -Wno-microsoft-anon-tag -fms-extensions

OFILES=\
	libc/dofmt.o\
	libc/dorfmt.o\
	libc/encodefmt.o\
	libc/fltfmt.o\
	libc/fmt.o\
	libc/fmtfd.o\
	libc/fmtfdflush.o\
	libc/fmtlock.o\
	libc/fmtprint.o\
	libc/fmtquote.o\
	libc/fmtrune.o\
	libc/fmtstr.o\
	libc/fmtvprint.o\
	libc/fprint.o\
	libc/genrandom.o\
	libc/mallocz.o\
	libc/nan64.o\
	libc/print.o\
	libc/rune.o\
	libc/snprint.o\
	libc/sprint.o\
	libc/strtod.o\
	libc/sysfatal.o\
	libc/u16.o\
	libc/u32.o\
	libc/u64.o\
	libc/utflen.o\
	libc/vfprint.o\
	libc/vsnprint.o\
	libmp/betomp.o\
	libmp/cnfield.o\
	libmp/gmfield.o\
	libmp/letomp.o\
	libmp/mpadd.o\
	libmp/mpaux.o\
	libmp/mpcmp.o\
	libmp/mpdigdiv.o\
	libmp/mpdiv.o\
	libmp/mpexp.o\
	libmp/mpextendedgcd.o\
	libmp/mpfield.o\
	libmp/mpfmt.o\
	libmp/mpinvert.o\
	libmp/mpleft.o\
	libmp/mplogic.o\
	libmp/mpmod.o\
	libmp/mpmodop.o\
	libmp/mpmul.o\
	libmp/mpnrand.o\
	libmp/mprand.o\
	libmp/mpright.o\
	libmp/mpsel.o\
	libmp/mpsub.o\
	libmp/mptobe.o\
	libmp/mptober.o\
	libmp/mptoi.o\
	libmp/mptole.o\
	libmp/mptolel.o\
	libmp/mptoui.o\
	libmp/mptouv.o\
	libmp/mptov.o\
	libmp/mpvecadd.o\
	libmp/mpveccmp.o\
	libmp/mpvecdigmuladd.o\
	libmp/mpvecsub.o\
	libmp/mpvectscmp.o\
	libmp/strtomp.o\
	pc.o\

.PHONY: all default install uninstall clean

all: default

default: $(TARGET)

install: $(TARGET)
	install -d $(DESTDIR)$(PREFIX)/bin
	install -m 755 $(TARGET) $(DESTDIR)$(PREFIX)/bin
	install -d $(DESTDIR)$(PREFIX)/share/man/man1
	install -m 644 pc.1 $(DESTDIR)$(PREFIX)/share/man/man1

uninstall:
	rm -f $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET) $(DESTDIR)$(PREFIX)/share/man/man1/pc.1

clean:
	rm -f $(TARG) $(OFILES) pc.c

$(TARGET): $(OFILES)

pc.o: pc.c

pc.c: pc.y