6 VERSIONHI = @VERSIONHI@
7 VERSIONLO = @VERSIONLO@
20 exec_prefix = @exec_prefix@
24 includedir = @includedir@
26 man1dir = $(mandir)/man1
27 man2dir = $(mandir)/man2
30 CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR)
31 CFLAGS = @CFLAGS@ -Wall
35 ASOBJECTS = asmain.o aslex.o assym.o assubr.o asnoice.o \
36 asexpr.o asdata.o aslist.o asout.o asstore.o \
37 i51ext.o i51pst.o i51mch.o i51adr.o strcmpi.o
38 ASSOURCES = $(patsubst %.o,%.c,$(ASOBJECTS))
40 LKOBJECTS = lkmain.o lkhead.o lkarea.o lkdata.o \
41 lkeval.o lklex.o lksym.o lkrloc.o \
42 lklibr.o lklist.o lkihx.o lks19.o \
43 lkstore.o lknoice.o lkmem.o lkaomf51.o strcmpi.o
44 LKSOURCES = $(patsubst %.o,%.c,$(LKOBJECTS))
46 ASX8051 = $(PRJDIR)/bin/asx8051
47 ASLINK = $(PRJDIR)/bin/aslink
49 transform = @program_transform_name@
51 # Compiling entire program or any subproject
52 # ------------------------------------------
53 all: checkconf $(ASX8051) $(ASLINK)
55 $(ASX8051): $(ASOBJECTS)
56 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ASOBJECTS)
58 $(ASLINK): $(LKOBJECTS)
59 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LKOBJECTS)
61 # Compiling and installing everything and runing test
62 # ---------------------------------------------------
63 install: all installdirs
64 $(INSTALL) $(ASX8051) `echo $(bindir)/asx8051|sed '$(transform)'`
65 $(STRIP) `echo $(bindir)/asx8051|sed '$(transform)'`
66 $(INSTALL) $(ASLINK) `echo $(bindir)/aslink|sed '$(transform)'`
67 $(STRIP) `echo $(bindir)/aslink|sed '$(transform)'`
69 # Deleting all the installed files
70 # --------------------------------
72 rm -f $(bindir)/asx8051 $(bindir)/aslink
75 # Performing self-test
76 # --------------------
80 # Performing installation test
81 # ----------------------------
85 # Creating installation directories
86 # ---------------------------------
88 $(INSTALL) -d $(bindir)
91 # Creating dependencies
92 # ---------------------
95 Makefile.dep: $(ASSOURCES) $(LKSOURCES) *.h $(PRJDIR)/*.h
96 $(CPP) $(CPPFLAGS) $(M_OR_MM) $(ASSOURCES) $(LKSOURCES) >Makefile.dep
104 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
107 # Remaking configuration
108 # ----------------------
110 @if [ -f $(PRJDIR)/devel ]; then\
111 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\