6 VERSIONHI = @VERSIONHI@
7 VERSIONLO = @VERSIONLO@
16 top_builddir = @top_builddir@
17 top_srcdir = @top_srcdir@
21 exec_prefix = @exec_prefix@
25 datarootdir = @datarootdir@
26 includedir = @includedir@
28 man1dir = $(mandir)/man1
29 man2dir = $(mandir)/man2
36 CPPFLAGS = @CPPFLAGS@ -I. -I$(srcdir)
37 CFLAGS = @CFLAGS@ -Wall -DINDEXLIB
41 ASOBJECTS = asmain.o aslex.o assym.o assubr.o asnoice.o \
42 asexpr.o asdata.o aslist.o asout.o asstore.o \
43 i51ext.o i51pst.o i51mch.o i51adr.o strcmpi.o
44 ASSOURCES = $(patsubst %.o,%.c,$(ASOBJECTS))
46 ASX8051 = $(top_builddir)/bin/asx8051$(EXEEXT)
48 transform = @program_transform_name@
50 # Compiling entire program or any subproject
51 # ------------------------------------------
52 all: checkconf $(ASX8051)
54 $(ASX8051): $(ASOBJECTS)
55 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ASOBJECTS)
57 # Compiling and installing everything and running test
58 # ----------------------------------------------------
59 install: all installdirs
60 $(INSTALL) $(ASX8051) `echo $(DESTDIR)$(bindir)/asx8051$(EXEEXT)|sed '$(transform)'`
61 $(STRIP) `echo $(DESTDIR)$(bindir)/asx8051$(EXEEXT)|sed '$(transform)'`
63 # Deleting all the installed files
64 # --------------------------------
66 rm -f $(DESTDIR)$(bindir)/asx8051$(EXEEXT)
69 # Performing self-test
70 # --------------------
74 # Performing installation test
75 # ----------------------------
79 # Creating installation directories
80 # ---------------------------------
82 $(INSTALL) -d $(DESTDIR)$(bindir)
85 # Creating dependencies
86 # ---------------------
89 Makefile.dep: $(ASSOURCES) $(srcdir)/*.h $(top_builddir)/*.h $(top_srcdir)/*.h
90 $(CPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.c,$^) >Makefile.dep
92 ifeq "$(findstring $(MAKECMDGOALS),uninstall check installcheck installdirs \
93 clean distclean mostlyclean realclean)" ""
96 include $(srcdir)/clean.mk
101 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
104 # Remaking configuration
105 # ----------------------
107 @if [ -f $(top_builddir)/devel ]; then\
108 $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\