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 -I. -I$(srcdir)
43 ASXXLIB = $(srcdir)/../asxxsrc
45 ASXXLIBSRC = strcmpi.c assym.c
47 SRC = asmain.c aslex.c assubr.c asnoice.c \
48 asexpr.c asdata.c aslist.c asout.c \
49 i51ext.c i51pst.c i51mch.c i51adr.c
51 ASSOURCES = %(SRC) $(ASXXLIBSRC:%.c=$(ASXXLIB)/%.c)
53 OBJS = $(SRC:%.c=$(OBJDIR)/%.o)
54 ASXXLIBOBJS = $(ASXXLIBSRC:%.c=$(OBJDIR)/%.o)
55 ASOBJECTS = $(OBJS) $(ASXXLIBOBJS)
57 ASX8051 = $(top_builddir)/bin/asx8051$(EXEEXT)
59 transform = @program_transform_name@
61 # Compiling entire program or any subproject
62 # ------------------------------------------
63 all: checkconf $(ASX8051)
65 $(ASX8051): $(ASOBJECTS)
66 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ASOBJECTS)
68 # Compiling and installing everything and running test
69 # ----------------------------------------------------
70 install: all installdirs
71 $(INSTALL) $(ASX8051) `echo $(DESTDIR)$(bindir)/asx8051$(EXEEXT)|sed '$(transform)'`
72 $(STRIP) `echo $(DESTDIR)$(bindir)/asx8051$(EXEEXT)|sed '$(transform)'`
74 # Deleting all the installed files
75 # --------------------------------
77 rm -f $(DESTDIR)$(bindir)/asx8051$(EXEEXT)
80 # Performing self-test
81 # --------------------
85 # Performing installation test
86 # ----------------------------
90 # Creating installation directories
91 # ---------------------------------
93 $(INSTALL) -d $(DESTDIR)$(bindir)
96 # Creating dependencies
97 # ---------------------
100 Makefile.dep: $(ASSOURCES) $(srcdir)/*.h
101 $(CPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.c,$^) >Makefile.dep
103 ifeq "$(findstring $(MAKECMDGOALS),uninstall check installcheck installdirs \
104 clean distclean mostlyclean realclean)" ""
105 -include Makefile.dep
107 include $(srcdir)/clean.mk
113 touch $(OBJDIR)/.stamp
115 $(OBJDIR)/%.o: %.c $(OBJDIR)/.stamp
116 $(CC) -c $(CFLAGS) -o $@ $<
118 $(OBJDIR)/%.o: $(ASXXLIB)/%.c $(OBJDIR)/.stamp
119 $(CC) -c $(CFLAGS) -o $@ $<
122 # Remaking configuration
123 # ----------------------
125 @if [ -f $(top_builddir)/devel ]; then\
126 $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\