shithub: scc

ref: 16ac0a93b39ea62401f2d2edb5f203ffe2e746b0
dir: /nm/Makefile/

View raw version
.POSIX:

PROJECTDIR = ..
LIBDIR = $(PROJECTDIR)/lib/scc
include $(PROJECTDIR)/rules.mk
include $(LIBDIR)/libdep.mk

OBJ       = main.o myro.o

all: nm

main.o: $(INCDIR)/scc.h $(INCDIR)/ar.h $(INCDIR)/arg.h
main.o: nm.h
myro.o: $(INCDIR)/scc.h $(INCDIR)/myro.h nm.h

nm: $(OBJ) $(LIBDIR)/libscc.a
	$(CC) $(SCC_LDFLAGS) $(OBJ) -lscc -o $@

$(LIBDIR)/libscc.a: $(LIB-OBJ)
	+cd $(LIBDIR) && $(MAKE)

dep:
clean:
	rm -f nm *.o

distclean: clean