shithub: scc

ref: 9c7973946f1d199343adaf0f516799bb6fd9ae0d
dir: /nm/Makefile/

View raw version
.POSIX:

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

OBJ       = main.o coff32.o formats.o

all: nm
	mkdir -p $(PROJECTDIR)/rootdir/bin
	cp nm $(PROJECTDIR)/rootdir/bin/nm

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

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

dep:
	$(PROJECTDIR)/mkdep.sh

clean:
	rm -f nm *.o

distclean: clean

#deps
coff32.c: ../inc/coff32/filehdr.h
coff32.c: ../inc/coff32/scnhdr.h
coff32.c: ../inc/coff32/syms.h
coff32.c: ../inc/scc.h
coff32.c: nm.h
formats.c: nm.h
main.c: ../inc/arg.h
main.c: ../inc/ar.h
main.c: ../inc/scc.h
main.c: nm.h