6 VERSIONHI = @VERSIONHI@
7 VERSIONLO = @VERSIONLO@
16 top_builddir = @top_builddir@
17 top_srcdir = @top_srcdir@
21 exec_prefix = @exec_prefix@
25 includedir = @includedir@
27 man1dir = $(mandir)/man1
28 man2dir = $(mandir)/man2
35 CPPFLAGS = @CPPFLAGS@ -I. -I$(srcdir)
36 CFLAGS = @CFLAGS@ -Wall -DINDEXLIB
40 ASOBJECTS = asmain.o aslex.o assym.o assubr.o asnoice.o \
41 asexpr.o asdata.o aslist.o asout.o asstore.o \
42 i51ext.o i51pst.o i51mch.o i51adr.o strcmpi.o
43 ASSOURCES = $(patsubst %.o,%.c,$(ASOBJECTS))
45 ASX8051 = $(top_builddir)bin/asx8051$(EXEEXT)
47 transform = @program_transform_name@
49 # Compiling entire program or any subproject
50 # ------------------------------------------
51 all: checkconf $(ASX8051)
53 $(ASX8051): $(ASOBJECTS)
54 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ASOBJECTS)
56 # Compiling and installing everything and running test
57 # ----------------------------------------------------
58 install: all installdirs
59 $(INSTALL) $(ASX8051) `echo $(DESTDIR)$(bindir)/asx8051$(EXEEXT)|sed '$(transform)'`
60 $(STRIP) `echo $(DESTDIR)$(bindir)/asx8051$(EXEEXT)|sed '$(transform)'`
62 # Deleting all the installed files
63 # --------------------------------
65 rm -f $(DESTDIR)$(bindir)/asx8051$(EXEEXT)
68 # Performing self-test
69 # --------------------
73 # Performing installation test
74 # ----------------------------
78 # Creating installation directories
79 # ---------------------------------
81 $(INSTALL) -d $(DESTDIR)$(bindir)
84 # Creating dependencies
85 # ---------------------
88 Makefile.dep: $(ASSOURCES) $(srcdir)/*.h $(top_builddir)*.h $(top_srcdir)/*.h
89 $(CPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.c,$^) >Makefile.dep
91 ifeq "$(findstring $(MAKECMDGOALS),uninstall check installcheck installdirs \
92 clean distclean mostlyclean realclean)" ""
95 include $(srcdir)/clean.mk
100 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
103 # Remaking configuration
104 # ----------------------
106 @if [ -f $(top_builddir)devel ]; then\
107 $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\