shithub: scc

ref: 3e2b9fc5817172876d54d82e4ddc7df78b051212
dir: /rules.mk/

View raw version
include $(PROJECTDIR)/config.mk

BINDIR  = $(PROJECTDIR)/rootdir/bin
INCDIR  = $(PROJECTDIR)/inc
LIBEXEC = $(PROJECTDIR)/rootdir/libexec/scc
LIBSCC  = $(PROJECTDIR)/lib/scc

SCC_CFLAGS = $(MOREFLAGS) \
             $(SYSCFLAGS) \
             -g \
             $(CFLAGS)

SCC_LDFLAGS = -L$(LIBSCC) -g $(LDFLAGS)

# helper macro to run over all the directories
FORALL = +@set -e ;\
	pwd=$$PWD; \
	for i in $(DIRS); \
	do \
		cd $$i; \
		$(MAKE) $@; \
		cd $$pwd; \
	done

.s.o:
	$(AS) $< -o $@

.c.o:
	$(CC) $(SCC_CFLAGS) -o $@ -c $<

.c:
	$(CC) $(SCC_CFLAGS) $(SCC_LDFLAGS) -o $@ $<

all:
dep:
clean:
distclean: clean