6 VERSIONHI = @VERSIONHI@
7 VERSIONLO = @VERSIONLO@
21 exec_prefix = @exec_prefix@
25 includedir = @includedir@
27 man1dir = $(mandir)/man1
28 man2dir = $(mandir)/man2
31 SLIB =$(PRJDIR)/support/Util
33 CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(PRJDIR)/as/z80 -I$(SLIB)
34 CFLAGS = @CFLAGS@ -Wall -DINDEXLIB -DMLH_MAP -DUNIX -DSDK -DSDK_VERSION_STRING="\"3.0.0\"" -DTARGET_STRING="\"gbz80\"" -funsigned-char
36 LDFLAGS = @LDFLAGS@ -lm
40 LKOBJECTS = lkarea.o lkdata.o lkeval.o lkhead.o lkihx.o lklex.o \
41 lklibr.o lklist.o lkmain.o lkrloc.o lks19.o lksym.o \
43 LKSOURCES = $(patsubst %.o,%.c,$(LKOBJECTS))
45 LKZ80 = $(PRJDIR)/bin/link-z80$(EXEEXT)
47 # Compiling entire program or any subproject
48 # ------------------------------------------
49 all: checkconf $(LKZ80)
51 $(LKZ80): $(SLIBOBJS) $(LKOBJECTS)
52 $(CC) $(CFLAGS) -o $@ $(SLIBOBJS) $(LKOBJECTS) $(LDFLAGS)
54 # Compiling and installing everything and runing test
55 # ---------------------------------------------------
56 install: all installdirs
57 $(INSTALL) $(LKZ80) $(bindir)/link-z80$(EXEEXT)
59 # Deleting all the installed files
60 # --------------------------------
62 rm -f $(bindir)/link-z80$(EXEEXT)
65 # Performing self-test
66 # --------------------
70 # Performing installation test
71 # ----------------------------
75 # Creating installation directories
76 # ---------------------------------
78 $(INSTALL) -d $(bindir)
81 # Creating dependencies
82 # ---------------------
85 Makefile.dep: $(LKSOURCES) *.h $(PRJDIR)/*.h
86 $(CPP) $(CPPFLAGS) $(M_OR_MM) $(LKSOURCES) >Makefile.dep
94 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
96 $(SLIBOBJS):%.o:$(SLIB)/%.c
97 $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
99 # Remaking configuration
100 # ----------------------
102 @if [ -f $(PRJDIR)/devel ]; then\
103 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\