6 VERSIONHI = @VERSIONHI@
7 VERSIONLO = @VERSIONLO@
19 exec_prefix = @exec_prefix@
23 includedir = @includedir@
25 man1dir = $(mandir)/man1
26 man2dir = $(mandir)/man2
29 SLIB =$(PRJDIR)/support/Util
31 CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(PRJDIR)/as/z80 -I$(SLIB)
32 CFLAGS = @CFLAGS@ -Wall -DINDEXLIB -DMLH_MAP -DUNIX -DSDK -DSDK_VERSION_STRING="\"3.0.0\"" -DTARGET_STRING="\"gbz80\"" -funsigned-char
34 LDFLAGS = @LDFLAGS@ -lm
38 LKOBJECTS = lkarea.o lkdata.o lkeval.o lkhead.o lkihx.o lklex.o \
39 lklibr.o lklist.o lkmain.o lkrloc.o lks19.o lksym.o \
41 LKSOURCES = $(patsubst %.o,%.c,$(LKOBJECTS))
43 LKZ80 = $(PRJDIR)/bin/link-z80
45 # Compiling entire program or any subproject
46 # ------------------------------------------
47 all: checkconf $(LKZ80)
49 $(LKZ80): $(SLIBOBJS) $(LKOBJECTS)
50 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SLIBOBJS) $(LKOBJECTS)
52 # Compiling and installing everything and runing test
53 # ---------------------------------------------------
54 install: all installdirs
55 $(INSTALL) $(LKZ80) $(bindir)/link-z80
57 # Deleting all the installed files
58 # --------------------------------
60 rm -f $(bindir)/link-z80
63 # Performing self-test
64 # --------------------
68 # Performing installation test
69 # ----------------------------
73 # Creating installation directories
74 # ---------------------------------
76 $(INSTALL) -d $(bindir)
79 # Creating dependencies
80 # ---------------------
83 Makefile.dep: $(LKSOURCES) *.h $(PRJDIR)/*.h
84 $(CPP) $(CPPFLAGS) $(M_OR_MM) $(LKSOURCES) >Makefile.dep
92 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
94 $(SLIBOBJS):%.o:$(SLIB)/%.c
95 $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
97 # Remaking configuration
98 # ----------------------
100 @if [ -f $(PRJDIR)/devel ]; then\
101 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\