Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

need to explain .diff file

Hi hippo,

In max140apps.diff,like:

Index: apps/ftpd/Makefile
===================================================================
--- apps/ftpd/Makefile    (revision 1)
+++ apps/ftpd/Makefile    (working copy)
@@ -2,20 +2,21 @@
#  configurable options
#   - set DEBUG = 1 to turn on debugging support
# 
-DEBUG = 1
+DEBUG = 0
 PROJ_NAME = ftpd
-INSTALL_DIR = 
-PROGS := $(PROJ_NAME).exe
-CFLAGS +=
+INSTALL_DIR = ~/rootfs
+PROGS := $(PROJ_NAME)
+CFLAGS += -O2
 
 PATHDEF_FTPLOGINMESG = -DPATH_FTPLOGINMESG=\"/etc/motd\"
 PATHDEF_FTPUSERS = -DPATH_FTPUSERS=\"/etc/ftpusers\"
 PATHDEF_FTPWELCOME = -DPATH_FTPWELCOME=\"/etc/ftpwelcome\"
+CROSS       := nios2-linux-uclibc-
+CC          := $(CROSS)gcc
 
# 
#  You should not need to modify anything beyond this point
# 
-include Rules.mak
 
 ifeq '$(DEBUG)' '1'
  PROGS += $(PROGS:.exe=.gdb)
@@ -31,11 +32,12 @@
 
 all: $(PROGS)
 
-$(PROJ_NAME).bin: $(FTPOBJS)
+$(PROJ_NAME): $(FTPOBJS)
+    $(CC) -elf2flt="$(FLTFLAGS)" -o $@ $(FTPOBJS) $(LDLIBS)
 
 .PHONY: clean
 clean:
-    -rm -f *. *.elf *.gdb *.bin *.exe
+    -rm -f *. *.gdb $(PROJ_NAME)
 
 .PHONY: install
 install: all
@@ -43,5 +45,5 @@
  $(error No installation directory specified)
 endif
  mkdir -p $(INSTALL_DIR)/bin
-    install -v $(filter %.exe, $(PROGS)) $(INSTALL_DIR)/bin
+    install -v $(PROGS) $(INSTALL_DIR)/bin

Does it generate by command diff?

Could you explain it?

Thank you??