# # # VERSION = @VERSION@ VERSIONHI = @VERSIONHI@ VERSIONLO = @VERSIONLO@ VERSIONP = @VERSIONP@ SHELL = /bin/sh CC = @CC@ CPP = @CPP@ INSTALL = @INSTALL@ PRJDIR = ../.. EXEEXT = @EXEEXT@ 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$(EXEEXT) # 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) $(DESTDIR)$(bindir)/link-z80$(EXEEXT) # Deleting all the installed files # -------------------------------- uninstall: rm -f $(DESTDIR)$(bindir)/link-z80$(EXEEXT) # Performing self-test # -------------------- check: # Performing installation test # ---------------------------- installcheck: # Creating installation directories # --------------------------------- installdirs: $(INSTALL) -d $(DESTDIR)$(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