#
# Makefile for a simple application.
#
# This example does things "the hard way", and doesn't use the object
# bundling feature.  It also avoids most fancy GNU makefile features.
#
FMS_TOP = ..
include $(FMS_TOP)/build/makedefs.mk

# Explicitly list object files.  Normally we list the source files in SRCS
# and let makerules.mk generate OBJS for us.  This approach also works.
OBJS = $(FMS_OBJDIR)/one.o $(FMS_OBJDIR)/two.o $(FMS_OBJDIR)/three.o

# What we want to build; if you don't want it in FMS_OBJDIR, you need
# to add CLEAN_HERE=clean-here and add a "clean-here" rule that removes it.
TARGET = $(FMS_OBJDIR)/app_four


#
# rules start here
#
include $(FMS_TOP)/build/makerules.mk

# build
here: $(TARGET)

# link the objects
$(TARGET): $(OBJS)
	@echo "   Manually linking $(TARGET)"
	@$(FMS_CCLD) -o $(TARGET) $(OBJS) $(LDFLAGS) $(LDLIBS)

# install
install-here:
	@echo "   Copying $(TARGET) to $(FMS_DIST_BINDIR)"
	@$(CPIFNEW) $(TARGET) $(FMS_DIST_BINDIR)

