aboutsummaryrefslogblamecommitdiffstats
path: root/Makefile
blob: bf1daeb3b6d314d6bb3fce43e3f17e31bf4f9e32 (plain) (tree)
1
2
3
4
5
6
7
8
9





                      


                    



                           

      
                 










                                               






                                                





                               
                                   
.POSIX:

CONFIGFILE = config.mk
include $(CONFIGFILE)

OBJ =\
	apsh.o\
	preparser.o\
	tokeniser.o\
	parser.o\
	interpreter.o\
	special_builtins.o\
	regular_builtins.o

HDR =\
	common.h\
	config.h

all: apsh
$(OBJ): $(@:.o=.c) $(HDR)

.c.o:
	$(CC) -c -o $@ $< $(CPPFLAGS) $(CFLAGS)

apsh: $(OBJ)
	$(CC) -o $@ $(OBJ) $(LDFLAGS)

install: apsh
	mkdir -p -- "$(DESTDIR)$(PREFIX)/bin/"
	cp -- apsh "$(DESTDIR)$(PREFIX)/bin/"

uninstall:
	-rm -f -- "$(DESTDIR)$(PREFIX)/bin/apsh"

clean:
	-rm -f -- *.o *.su apsh

.SUFFIXES:
.SUFFIXES: .o .c

.PHONY: all install uninstall clean