6 VERSIONHI = @VERSIONHI@
7 VERSIONLO = @VERSIONLO@
20 exec_prefix = @exec_prefix@
24 includedir = @includedir@
26 man1dir = $(mandir)/man1
27 man2dir = $(mandir)/man2
32 CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR)
33 CFLAGS = @CFLAGS@ -Wall
37 ASOBJECTS = asmain.o aslex.o assym.o assubr.o asnoice.o \
38 asexpr.o asdata.o aslist.o asout.o asstore.o \
39 i51ext.o i51pst.o i51mch.o i51adr.o strcmpi.o
40 ASSOURCES = $(patsubst %.o,%.c,$(ASOBJECTS))
42 LKOBJECTS = lkmain.o lkhead.o lkarea.o lkdata.o \
43 lkeval.o lklex.o lksym.o lkrloc.o \
44 lklibr.o lklist.o lkihx.o lks19.o \
45 lkstore.o lknoice.o lkmem.o lkaomf51.o strcmpi.o
46 LKSOURCES = $(patsubst %.o,%.c,$(LKOBJECTS))
48 ASX8051 = $(PRJDIR)/bin/asx8051$(EXEEXT)
49 ASLINK = $(PRJDIR)/bin/aslink$(EXEEXT)
51 transform = @program_transform_name@
53 # Compiling entire program or any subproject
54 # ------------------------------------------
55 all: checkconf $(ASX8051) $(ASLINK)
57 $(ASX8051): $(ASOBJECTS)
58 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ASOBJECTS)
60 $(ASLINK): $(LKOBJECTS)
61 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LKOBJECTS)
63 # Compiling and installing everything and runing test
64 # ---------------------------------------------------
65 install: all installdirs
66 $(INSTALL) $(ASX8051) `echo $(bindir)/asx8051$(EXEEXT)|sed '$(transform)'`
67 $(STRIP) `echo $(bindir)/asx8051$(EXEEXT)|sed '$(transform)'`
68 $(INSTALL) $(ASLINK) `echo $(bindir)/aslink$(EXEEXT)|sed '$(transform)'`
69 $(STRIP) `echo $(bindir)/aslink$(EXEEXT)|sed '$(transform)'`
71 # Deleting all the installed files
72 # --------------------------------
74 rm -f $(bindir)/asx8051$(EXEEXT) $(bindir)/aslink$(EXEEXT)
77 # Performing self-test
78 # --------------------
82 # Performing installation test
83 # ----------------------------
87 # Creating installation directories
88 # ---------------------------------
90 $(INSTALL) -d $(bindir)
93 # Creating dependencies
94 # ---------------------
97 Makefile.dep: $(ASSOURCES) $(LKSOURCES) *.h $(PRJDIR)/*.h
98 $(CPP) $(CPPFLAGS) $(M_OR_MM) $(ASSOURCES) $(LKSOURCES) >Makefile.dep
106 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
109 # Remaking configuration
110 # ----------------------
112 @if [ -f $(PRJDIR)/devel ]; then\
113 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\