33 lines
461 B
Makefile
33 lines
461 B
Makefile
.POSIX:
|
|
|
|
include config.mk
|
|
|
|
SRC = st.c x.c
|
|
OBJ = $(SRC:.c=.o)
|
|
|
|
all: st
|
|
|
|
.c.o:
|
|
$(CC) $(STCFLAGS) -c $<
|
|
|
|
st.o: config.h st.h win.h
|
|
x.o: arg.h config.h st.h win.h
|
|
|
|
$(OBJ): config.h config.mk
|
|
|
|
st: $(OBJ)
|
|
$(CC) -o $@ $(OBJ) $(STLDFLAGS)
|
|
|
|
clean:
|
|
rm -f st $(OBJ)
|
|
|
|
install: st
|
|
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
|
cp -f st $(DESTDIR)$(PREFIX)/bin
|
|
chmod 755 $(DESTDIR)$(PREFIX)/bin/st
|
|
|
|
uninstall:
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/st
|
|
|
|
.PHONY: all clean install uninstall
|