F
fl
Hi,
I am new to makefile. The original C source can be compiled and the
exec runs well. Now, I want to change a module distribute.c to
distribute0.c for some minor modification to make a comparison. See
the following makefile with the comments place (i.e. I change
distribute.c to distribute0.c, the same to distribute.o). I find that
the new exec file is not recognized at the Bash of Linux. It says:
If 'make-ldpc' is not a typo you can use command-not-found to lookup
the package that contains it. like this:
cnf make-ldpc.
Although it can run with the './' prefix, I want to know the reason
for this new requirement. Thanks.
..................
COMPILE = cc -c -O # Command to compile a module from .c to .o
LINK = cc # Command to link a program
# MAKE ALL THE MAIN PROGRAMS. First makes the modules used.
progs: modules
$(COMPILE) make-ldpc.c
$(LINK) make-ldpc.o mod2sparse.o mod2dense.o mod2convert.o \
rcode.o rand.o alloc.o intio.o open.o distrib.o -lm -o make-
ldpc
# changed to distrib0.o
# MAKE THE TEST PROGRAMS. First makes the modules used.
# MAKE THE MODULES USED BY THE PROGRAMS.
modules:
$(COMPILE) alloc.c
$(COMPILE) intio.c
$(COMPILE) blockio.c
$(COMPILE) check.c
$(COMPILE) open.c
$(COMPILE) distrib.c # changed to
distrib0.c
$(COMPILE) -DRAND_FILE=\"`pwd`/randfile\" asm_rand.c
I am new to makefile. The original C source can be compiled and the
exec runs well. Now, I want to change a module distribute.c to
distribute0.c for some minor modification to make a comparison. See
the following makefile with the comments place (i.e. I change
distribute.c to distribute0.c, the same to distribute.o). I find that
the new exec file is not recognized at the Bash of Linux. It says:
If 'make-ldpc' is not a typo you can use command-not-found to lookup
the package that contains it. like this:
cnf make-ldpc.
Although it can run with the './' prefix, I want to know the reason
for this new requirement. Thanks.
..................
COMPILE = cc -c -O # Command to compile a module from .c to .o
LINK = cc # Command to link a program
# MAKE ALL THE MAIN PROGRAMS. First makes the modules used.
progs: modules
$(COMPILE) make-ldpc.c
$(LINK) make-ldpc.o mod2sparse.o mod2dense.o mod2convert.o \
rcode.o rand.o alloc.o intio.o open.o distrib.o -lm -o make-
ldpc
# changed to distrib0.o
# MAKE THE TEST PROGRAMS. First makes the modules used.
# MAKE THE MODULES USED BY THE PROGRAMS.
modules:
$(COMPILE) alloc.c
$(COMPILE) intio.c
$(COMPILE) blockio.c
$(COMPILE) check.c
$(COMPILE) open.c
$(COMPILE) distrib.c # changed to
distrib0.c
$(COMPILE) -DRAND_FILE=\"`pwd`/randfile\" asm_rand.c