Adrian
Adrian

Reputation: 5681

Error: Don't know how to make

I have been given a makefile which I modified into this:

############################################
# Makefile using OCI (Oracle Call Interface)
# D. LaRue  -  May, 2001
############################################

ORACLE_HOME=/opt/oratcp11/product/11.2.0/client11R2_32bits
CC=/opt/SUNWspro/SUNWspro12/sparc/SUNWspro/bin/cc
COMMON_SRC=../common
BNS_INCLUDE=../include
LIBHOME=$(ORACLE_HOME)/lib/
RDBMSLIB=$(ORACLE_HOME)/rdbms/lib/
WSSCOMMON_LIB=/vobs/wssCommon/lib_32
TARGET_DIR=.

LLIBCRYPTO  =-lbnscrypto
LSOLCRYPTO  =-lcryptoutil -lpkcs11
WSSLIBS     =-lwssmbx -ldes
LIBRDBMS_CLT    =-lclient11 -lvsn11 -lcommon11 -lgeneric11 -lmm
LLIBCLNTSH      =-lclntsh -ldl 
CORELIBS        =-lcore11 -lnls11 
LDLIBS          =-lnsl -lsocket -lgen -lm
EXSYSLIBS       =-R $(ORACLE_HOME)/lib

STATICTTLIBS    =$(LLIBRDBMS_CLT) $(CORELIBS) $(WSSLIBS) $(LLIBCRYPTO)
OCISHAREDLIBS   =$(LLIBCLNTSH) $(LDLIBS) -Bstatic $(STATICTTLIBS) -Bdynamic $(LSOLCRYPTO)

LDFLAGS     =-L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/rdbms/lib -L$(WSSCOMMON_LIB) -L../lib_32

INCLUDE     =-I$(ORACLE_HOME)/rdbms/demo -I$(ORACLE_HOME)/rdbms/public -I$(ORACLE_HOME)/plsql/public -I$(ORACLE_HOME)/network/public -I$(COMMON_SRC) -I$(BNS_INCLUDE) -I. 

CFLAGS      =$(INCLUDE) $(LDFLAGS) -g -Xt

BESSOBJS=bessToWss.o

COMMONLIST=$(COMMON_SRC)/oracle.c \
           $(COMMON_SRC)/logger.c 

INTFOBJS=$(BESSOBJS) $(COMMONLIST)

ALL:    $(TARGET_DIR)/bessToWss

$(TARGET_DIR)/bessToWss: $(INTFOBJS)
    $(CC) $(CFLAGS) $(INTFOBJS) $(OCISHAREDLIBS) -o $@

clean:
    $(RM) *.o

When I run the file I get an error

". Stop.e: Error:  Don't know how to make "bessToWss

Any idea what is wrong? I run this on some unix machine via a script. The script calls make after sets some paths or some other settings. As you can see I'm not sure how it's called.

Thanks :)

Upvotes: 1

Views: 6105

Answers (1)

Jonathan Leffler
Jonathan Leffler

Reputation: 753695

The error message looks peculiar — do you have CRLF line endings in the makefile?

". Stop.e: Error: Don't know how to make "bessToWss

That could be:

/bin/make: Error: Don't know how to make "bessToWssCR". Stop.

where the CR is the carriage return moving the print position back to the start of the line.

Did you create the makefile, or edit it, on a Windows machine? Did you FTP or copy it without using a text mode transfer, so the CRLF line-endings were preserved?

If so, get rid of the carriage returns. Edit the file on Unix with vim and do :set fileformat=unix and save again.

Under this hypothesis, make is trying to build a program whose name includes a CR (carriage return) in the name and you've not given it a rule for doing that.

Upvotes: 4

Related Questions