shithub: scc

ref: f2e04e5f2f85f9dda6d813a9a47a95995de1e5aa
dir: /scripts/rules.mk/

View raw version
CONF=amd64-linux
include $(PROJECTDIR)/config/$(CONF).mk

LIBDIR     = $(PROJECTDIR)/lib/scc
SCRIPTDIR  = $(PROJECTDIR)/scripts
INCDIR     = $(PROJECTDIR)/include

BINDIR     = $(PROJECTDIR)/bin
LIBEXEC    = $(PROJECTDIR)/libexec/scc
CRTDIR     = $(PROJECTDIR)/lib/scc
LIBCDIR    = $(CRTDIR)/$(ARCH)-$(SYS)/

INCLUDE    = -I$(INCDIR)/scc \

RL	   = $(RANLIB)

SCC_CFLAGS = $(MORECFLAGS) \
             $(SYSCFLAGS) \
             $(INCLUDE) \
             -g \
             $(CFLAGS)

SCC_LDFLAGS = $(MORELFLAGS) \
              $(SYSLDFLAGS) \
              -L$(LIBDIR) \
              -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

.o:
	$(CC) $(SCC_LDFLAGS) -o $@ $< $(LIBS)

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

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

all:

dep:

inc-dep: FORCE
	$(SCRIPTDIR)/mkdep

clean: clean-helper

clean-helper:
	rm -f *.o $(OBJS) $(TARGET)

FORCE: