Forum Discussion
Altera_Forum
Honored Contributor
20 years agoHi OneNet,
> How can I write a makefile ( makefile & rule.mak ) for above project First read the Linux Reference Guide section, "Creating a Makefile" ... basically, you just need to include the Rules.mak and pretty much do what you would always do. E.g.:TARGET = foo.exe
CSRC = foo.c bar.c
OBJS = $(CSRC:.c=.o) # All object files
LDFLAGS +=
# #################################################################
.PHONY: default install clean realclean distclean depend
default: deps $(TARGET)
install:
cp -pf $(TARGET) $(BIN_INSTALL)
clean:
rm -rf $(OBJS) core
distclean: clean
rm -f deps
rm -rf $(TARGET)
depend: deps
sinclude deps
include Rules.mak Regards, --Scott