gbdk-releases/sdcc/link/z80/Makefile.in
2015-01-10 16:25:09 +01:00

105 lines
2.3 KiB
Makefile

#
#
#
VERSION = @VERSION@
VERSIONHI = @VERSIONHI@
VERSIONLO = @VERSIONLO@
VERSIONP = @VERSIONP@
SHELL = /bin/sh
CC = @CC@
CPP = @CPP@
INSTALL = @INSTALL@
PRJDIR = ../..
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
datadir = @datadir@
includedir = @includedir@
mandir = @mandir@
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
infodir = @infodir@
SLIB =$(PRJDIR)/support/Util
CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(PRJDIR)/as/z80 -I$(SLIB)
CFLAGS = @CFLAGS@ -Wall -DINDEXLIB -DMLH_MAP -DUNIX -DSDK -DSDK_VERSION_STRING="\"3.0.0\"" -DTARGET_STRING="\"gbz80\"" -funsigned-char
M_OR_MM = @M_OR_MM@
LDFLAGS = @LDFLAGS@ -lm
SLIBOBJS = NewAlloc.o
LKOBJECTS = lkarea.o lkdata.o lkeval.o lkhead.o lkihx.o lklex.o \
lklibr.o lklist.o lkmain.o lkrloc.o lks19.o lksym.o \
lkgb.o lkgg.o
LKSOURCES = $(patsubst %.o,%.c,$(LKOBJECTS))
LKZ80 = $(PRJDIR)/bin/link-z80
# Compiling entire program or any subproject
# ------------------------------------------
all: checkconf $(LKZ80)
$(LKZ80): $(SLIBOBJS) $(LKOBJECTS)
$(CC) $(CFLAGS) -o $@ $(SLIBOBJS) $(LKOBJECTS) $(LDFLAGS)
# Compiling and installing everything and runing test
# ---------------------------------------------------
install: all installdirs
$(INSTALL) $(LKZ80) $(bindir)/link-z80
# Deleting all the installed files
# --------------------------------
uninstall:
rm -f $(bindir)/link-z80
# Performing self-test
# --------------------
check:
# Performing installation test
# ----------------------------
installcheck:
# Creating installation directories
# ---------------------------------
installdirs:
$(INSTALL) -d $(bindir)
# Creating dependencies
# ---------------------
dep: Makefile.dep
Makefile.dep: $(LKSOURCES) *.h $(PRJDIR)/*.h
$(CPP) $(CPPFLAGS) $(M_OR_MM) $(LKSOURCES) >Makefile.dep
include Makefile.dep
include clean.mk
# My rules
# --------
.c.o:
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
$(SLIBOBJS):%.o:$(SLIB)/%.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
# Remaking configuration
# ----------------------
checkconf:
@if [ -f $(PRJDIR)/devel ]; then\
$(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
fi
# End of Makefile