SDCC_MISC = debugger/mcs51 sim/ucsim
SDCC_LIBS = support/cpp
SDCC_ASLINK = as/mcs51 as link
+SDCC_PACKIHX = packihx
PKGS = $(SDCC_MISC) $(SDCC_LIBS) $(SDCC_ASLINK) \
- src device/include device/lib
+ src device/include device/lib $(SDCC_PACKIHX)
PKGS_TINI = $(SDCC_LIBS) $(SDCC_ASLINK) \
- src device/include
+ src device/include $(SDCC_PACKIHX)
PORTS = mcs51 z80
srcdir = .
sdcc-misc:
for misc in $(SDCC_MISC); do $(MAKE) -C $$misc; done
+sdcc-packihx:
+ $(MAKE) -C $(SDCC_PACKIHX)
+
sdcc-device:
$(MAKE) -C device/include
$(MAKE) -C device/lib
$(MAKE) -C device/include
$(MAKE) -C device/lib modelDS390
-sdcc: sdcc-cc sdcc-aslink sdcc-misc sdcc-device
+sdcc: sdcc-cc sdcc-aslink sdcc-misc sdcc-device sdcc-packihx
$(MAKE) -f main.mk all
-sdcc-tini: sdcc-cc sdcc-aslink sdcc-device-tini
+sdcc-tini: sdcc-cc sdcc-aslink sdcc-device-tini sdcc-packihx
$(MAKE) -f main.mk all
# Some interesting sub rules
# ===========================================================================
subdirs="sim/ucsim"
+subdirs="sim/ucsim packihx"
+
# MLH: removed as the rules are already in Makefile.common
#as/z80/Makefile
#link/z80/Makefile
esac
done
- for ac_config_dir in sim/ucsim; do
+ for ac_config_dir in sim/ucsim packihx; do
# Do not complain, so a configure script can configure whichever
# parts of a large source tree are present.
# Generating output files
# ===========================================================================
AC_CONFIG_SUBDIRS(sim/ucsim)
+AC_CONFIG_SUBDIRS(packihx)
# MLH: removed as the rules are already in Makefile.common
#as/z80/Makefile
#link/z80/Makefile
SOURCES = $(patsubst %.o,%.c,$(OBJECTS))
-TARGET = packihx
+TARGET = $(PRJDIR)/bin/packihx
all: $(TARGET)
checkconf:
-clean:
- rm -f *core *[%~] *.[oa] *.output
- rm -f .[a-z]*~ \#*
- rm -f packihx
-
-distclean: clean
- rm -f config.*
+include clean.mk
--- /dev/null
+clean:
+ rm -f *core *[%~] *.[oa] *.output
+ rm -f .[a-z]*~ \#*
+ rm -f packihx
+
+distclean: clean
+ rm -f config.*
SOURCES = $(patsubst %.o,%.c,$(OBJECTS))
TARGET = $(PRJDIR)/bin/sdcc
-PACKIHX = $(PRJDIR)/bin/packihx
# Compiling entire program or any subproject
# ------------------------------------------
-all: ports checkconf $(LIBGC) $(TARGET) $(PACKIHX)
+all: ports checkconf $(LIBGC) $(TARGET)
ports:
for i in $(PORTS); do $(MAKE) -C $$i; done
# ---------------------------------------------------
install: all installdirs
$(INSTALL) -s $(TARGET) $(bindir)/sdcc
- $(INSTALL) $(PACKIHX) $(bindir)/packihx
# Deleting all the installed files
$(TARGET): $(OBJECTS) $(PORT_LIBS)
$(CC) -o $@ $(OBJECTS) $(PORT_LIBS) $(LIBDIRS) $(LIBS)
-$(PACKIHX): packihx
- $(INSTALL) packihx $(PACKIHX)
-
.c.o:
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@