6 VERSIONHI = @VERSIONHI@
7 VERSIONLO = @VERSIONLO@
19 exec_prefix = ${prefix}
20 bindir = ${exec_prefix}/bin
21 libdir = ${exec_prefix}/lib
22 datadir = ${prefix}/share
23 includedir = ${prefix}/include
24 mandir = ${prefix}/man
25 man1dir = $(mandir)/man1
26 man2dir = $(mandir)/man2
27 infodir = ${prefix}/info
29 CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(PRJDIR)/as/z80
30 CFLAGS = @CFLAGS@ -Wall -DINDEXLIB -DMLH_MAP -DUNIX -DSDK -DSDK_VERSION_STRING="\"3.0.0\"" -DTARGET_STRING="\"gbz80\"" -funsigned-char
32 LDFLAGS = @LDFLAGS@ -lm
34 LKOBJECTS = lkarea.o lkdata.o lkeval.o lkhead.o lkihx.o lklex.o \
35 lklibr.o lklist.o lkmain.o lkrloc.o lks19.o lksym.o \
37 LKSOURCES = $(patsubst %.o,%.c,$(LKOBJECTS))
39 LKZ80 = $(PRJDIR)/bin/link-z80
41 # Compiling entire program or any subproject
42 # ------------------------------------------
43 all: checkconf $(LKZ80)
45 $(LKZ80): $(LKOBJECTS)
46 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LKOBJECTS)
48 # Compiling and installing everything and runing test
49 # ---------------------------------------------------
50 install: all installdirs
51 $(INSTALL) -s $(LKZ80) $(bindir)/link-z80
53 # Deleting all the installed files
54 # --------------------------------
56 rm -f $(bindir)/link-z80
59 # Performing self-test
60 # --------------------
64 # Performing installation test
65 # ----------------------------
69 # Creating installation directories
70 # ---------------------------------
72 $(INSTALL) -d $(bindir)
75 # Creating dependencies
76 # ---------------------
79 Makefile.dep: $(LKSOURCES) *.h $(PRJDIR)/*.h
80 $(CPP) $(CPPFLAGS) $(M_OR_MM) $(LKSOURCES) >Makefile.dep
88 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
91 # Remaking configuration
92 # ----------------------
94 @if [ -f $(PRJDIR)/devel ]; then\
95 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\