6 VERSIONHI = @VERSIONHI@
7 VERSIONLO = @VERSIONLO@
19 exec_prefix = @exec_prefix@
23 includedir = @include@
25 man1dir = $(mandir)/man1
26 man2dir = $(mandir)/man2
29 CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR)
30 CFLAGS = @CFLAGS@ -Wall -DINDEXLIB -DMLH_MAP -DUNIX -DSDK -funsigned-char -ggdb
32 LDFLAGS = @LDFLAGS@ -lm
34 ASOBJECTS = asdata.o asexpr.o aslex.o aslist.o asmain.o asout.o \
35 assubr.o assym.o z80adr.o z80ext.o z80mch.o z80pst.o
36 ASSOURCES = $(patsubst %.o,%.c,$(ASOBJECTS))
38 ASXZ80 = $(PRJDIR)/bin/as-z80
40 # Compiling entire program or any subproject
41 # ------------------------------------------
42 all: checkconf $(ASXZ80)
44 $(ASXZ80): $(ASOBJECTS)
45 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ASOBJECTS)
47 # Compiling and installing everything and runing test
48 # ---------------------------------------------------
49 install: all installdirs
50 $(INSTALL) $(ASXZ80) $(bindir)/as-z80
52 # Deleting all the installed files
53 # --------------------------------
55 rm -f $(bindir)/as-z80
58 # Performing self-test
59 # --------------------
63 # Performing installation test
64 # ----------------------------
68 # Creating installation directories
69 # ---------------------------------
71 $(INSTALL) -d $(bindir)
74 # Creating dependencies
75 # ---------------------
78 Makefile.dep: $(ASSOURCES) *.h $(PRJDIR)/*.h
79 $(CPP) $(CPPFLAGS) $(M_OR_MM) $(ASSOURCES) >Makefile.dep
87 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
90 # Remaking configuration
91 # ----------------------
93 @if [ -f $(PRJDIR)/devel ]; then\
94 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\