Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when i compile this make file,it gives error type name exected,illegal character $,@. Please any one can help in how to use this make file?

OBJS = generate.obj factgen.obj represen.obj timegen.obj tmdates.obj writers.obj brangen.obj custygen.obj params.obj random.obj strname.obj zipcity.obj

generate: $(OBJS)
    g++ $(OBJS) -lg++ -lm -o $@

generate.obj: generate.cc timegen.h zipcity.h custygen.h brangen.h params.h represen.h tmdates.h
    g++ -c generate.cc

factgen.obj: factgen.cc factgen.h brangen.h random.h represen.h zipcity.h params.h tmdates.h
    g++ -c factgen.cc

represen.obj: represen.cc represen.h tmdates.h strname.h
    g++ -c represen.cc

tmdates.obj: tmdates.cc tmdates.h
    g++ -c tmdates.cc

timegen.obj: timegen.cc timegen.h tmdates.h
    g++ -c timegen.cc

writers.obj: writers.cc writers.h tmdates.h
    g++ -c writers.cc

brangen.obj: brangen.cc brangen.h random.h represen.h zipcity.h params.h tmdates.h
    g++ -c brangen.cc

custygen.obj: custygen.cc custygen.h represen.h zipcity.h params.h tmdates.h
    g++ -c custygen.cc

params.obj: params.cc params.h strname.h tmdates.h
    g++ -c params.cc

random.obj: random.cc random.h
    g++ -c random.cc

strname.obj: strname.cc strname.h
    g++ -c strname.cc

zipcity.obj: zipcity.cc zipcity.h random.h
    g++ -c zipcity.cc
Posted

1 solution

You must NOT compile a Makefile.
You have to use the make command to build the project:
just type
make

at the shell prompt (make sure to be in the folder containing the Makefile file).
:)
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900