# # # VERSION = @VERSION@ VERSIONHI = @VERSIONHI@ VERSIONLO = @VERSIONLO@ VERSIONP = @VERSIONP@ SHELL = /bin/sh CC = @CC@ CPP = @CPP@ INSTALL = @INSTALL@ PRJDIR = ../.. srcdir = @srcdir@ prefix = @prefix@ exec_prefix = ${prefix} bindir = ${exec_prefix}/bin libdir = ${exec_prefix}/lib datadir = ${prefix}/share includedir = ${prefix}/include mandir = ${prefix}/man man1dir = $(mandir)/man1 man2dir = $(mandir)/man2 infodir = ${prefix}/info CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(PRJDIR)/as/z80 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 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): $(LKOBJECTS) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LKOBJECTS) # Compiling and installing everything and runing test # --------------------------------------------------- install: all installdirs $(INSTALL) -s $(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 $@ $< # Remaking configuration # ---------------------- checkconf: @if [ -f $(PRJDIR)/devel ]; then\ $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\ fi # End of Makefile