delphi programming forums mysql charset mget recursive synonimos
free ventrilo servers hosting cs javascript delay python find in list
Back Forum New
abstract:

        $(CC) $(CFLAGS) -c look.c
astrolib.o: astrolib.c astrolib.h astrocon.h support.h
        $(CC) $(CFLAGS) -c astrolib.c
astrocon.o: astrocon.c astrocon.h
        $(CC) $(CFLAGS) -c astrocon.c
support.o: support.c support.h
        $(CC) $(CFLAGS) -c support.c

What must I change in this makefile to be compatible with BSD? And one more question: will the result exes (2) run in any Linux environment?
Best regards,
Kepler


Hi,
I'm trying for some time to compile some C files to run in the Linux environment. Until now, the only thing I've got is a semi-operational executable ( works only 60% ). Following the advice of a friend, I manage to get a shell account in a BSD server. So I putted all the files there, including the makefile.unx
I run the make command and get something stupid like:
-f sephem.cnsi - pedantic...etc
and stopped automaticaly.
The makefile is like this:
INCLUDE=
LIBS= -lm
CC=gcc
# For normal use
# CFLAGS=-ansi -pedantic -Wall -s -O
# For debugging
CFLAGS = -ansi -pedantic -Wall -g
TARGETS = sephem look
# Now the actual rules
all: $(TARGETS)
clean:
        -rm *.o
        -rm *.log
        -rm *.exe
sephem: sephem.o astrolib.o astrocon.o support.o
        $(CC) $(CFLAGS) -o sephem sephem.o astrolib.o astrocon.o support.o $(LIBS)
look: look.o
        $(CC) $(CFLAGS) -o look look.o $(LIBS)
sephem.o: sephem.c astrolib.h support.h
        $(CC) $(CFLAGS) -c sephem.c
look.o: look.c
        $(CC) $(CFLAGS) -c look.c
astrolib.o: astrolib.c astrolib.h astrocon.h support.h
        $(CC) $(CFLAGS) -c astrolib.c
astrocon.o: astrocon.c astrocon.h
        $(CC) $(CFLAGS) -c astrocon.c
support.o: support.c support.h
        $(CC) $(CFLAGS) -c support.c
What must I change in this makefile to be compatible with BSD? And one more question: will the result exes (2) run in any Linux environment?
Best regards,
Kepler

TOP

There are thousands of examples of Makefile if you have the FreeBSD source in your /usr/src. If not, just go to the FTP site and get it.



        $(CC) $(CFLAGS) -c look.c
astrolib.o: astrolib.c astrolib.h astrocon.h support.h
        $(CC) $(CFLAGS) -c astrolib.c
astrocon.o: astrocon.c astrocon.h
        $(CC) $(CFLAGS) -c astrocon.c
support.o: support.c support.h
        $(CC) $(CFLAGS) -c support.c

What must I change in this makefile to be compatible with BSD? And one more question: will the result exes (2) run in any Linux environment?
Best regards,
Kepler

TOP

Back Forum