makefile

10 отговора 331 прегледа
#1

makefile

zdraveite
iskam da vyprosna za edna programka...
znachi svalih si source code i vytre vyv faila readme pishe da se sledvat instrukciite v make-faila
eto mu izgleda:

# @(#) Makefile 1.5 96/05/31 15:50:40

####################################
### Beginning of configurable stuff.

# By default, logfile entries are written to the same file as used for
# sendmail transaction logs. Change the definition of the following macro
# if you disagree. See `man 3 syslog' for examples. Some syslog versions
# do not provide this flexibility.
#
FACILITY=LOG_MAIL

# To disable host access control, comment out the following macro definition.
# Note: host access control requires the strtok() and strchr() routines.
# Host access control can also be turned off by providing no access control
# tables. The local system, since it runs the portmap daemon, is always
# treated as an authorized host.

HOSTS_ACCESS= -DHOSTS_ACCESS

# Comment out if your RPC library does not allocate privileged ports for
# requests from processes with root privilege, or the new portmap will
# always reject requests to register/unregister services on privileged
# ports. You can find out by running "rpcinfo -p"; if all mountd and NIS
# daemons use a port >= 1024 you should probably disable the next line.

CHECK_PORT = -DCHECK_PORT

# When the portmapper cannot find any local interfaces (it will complain
# to the syslog daemon) your system probably has variable-length socket
# address structures (struct sockaddr has a sa_len component; examples:
# AIX 4.1 and 4.4BSD). Uncomment next macro definition in that case.
#
# SA_LEN = -DHAS_SA_LEN # AIX 4.x, BSD 4.4

# With verbose logging on, HP-UX 9.x and AIX 4.1 leave zombies behind when
# SIGCHLD is not ignored. Enable next macro for a fix.
#
# ZOMBIES = -DIGNORE_SIGCHLD # AIX 4.x, HP-UX 9.x

# Uncomment the following macro if your system does not have u_long.
#
# ULONG =-Du_long="unsigned long"

# Later versions of the tcp wrapper (log_tcp package) come with a
# libwrap.a object library. WRAP_DIR should specify the directory with
# that library.

WRAP_DIR= ../tcp_wrappers

# Auxiliary object files that may be missing from your C library.
#
AUX = daemon.o strerror.o

# NEXTSTEP is a little different. The following seems to work with NS 3.2
#
# SETPGRP =-DUSE_SETPGRP00
# LIBS = -m
# NSARCHS = -arch m68k -arch i386 -arch hppa

# Auxiliary libraries that you may have to specify
#
# LIBS = -lrpc

### End of configurable stuff.
##############################

SHELL = /bin/sh

COPT = -Dconst= -Dperror=xperror $(HOSTS_ACCESS) $(CHECK_PORT) \
$(SYS) -DFACILITY=$(FACILITY) $(ULONG) $(ZOMBIES) $(SA_LEN)
CFLAGS = $(COPT) -O $(NSARCHS) $(SETPGRP)
OBJECTS = portmap.o pmap_check.o from_local.o $(AUX)

all: portmap pmap_dump pmap_set

portmap: $(OBJECTS) $(WRAP_DIR)/libwrap.a
$(CC) $(CFLAGS) -o $@ $(OBJECTS) $(WRAP_DIR)/libwrap.a $(LIBS)

pmap_dump: pmap_dump.c
$(CC) $(CFLAGS) -o $@ $? $(LIBS)

pmap_set: pmap_set.c
$(CC) $(CFLAGS) -o $@ $? $(LIBS)

from_local: from_local.c
cc $(CFLAGS) -DTEST -o $@ from_local.c

lint:
lint $(COPT) $(OBJECTS:%.o=%.c)

clean:
rm -f *.o portmap pmap_dump pmap_set from_local core

tidy: clean
chmod 755 . ; chmod -R a+r .

deps:
@$(CC) -M $(CFLAGS) *.c | grep -v /usr/include |sed 's/\.\///'

daemon.o: daemon.c
from_local.o: from_local.c
pmap_check.o: pmap_check.c pmap_check.h Makefile
pmap_dump.o: pmap_dump.c
pmap_set.o: pmap_set.c
portmap.o: portmap.c
portmap.o: pmap_check.h
strerror.o: strerror.c

ta ne mi stana yasno kak da go otpochna da go kompiliram...
bihte li mi pomognali?
10x predvaritelno na otzovalite se...

Shutdown The Computer;
Remove The User
Отговор
в отговор на knight_ #2

pod kakwa OS si?

ako si pod Windows, samo ako imash CYGWIN (UWIN ili MINGW) instalirani moga da ti pomogna, ako si pod Linux shte produlzhim.

koja versia na make imash (GNU-make) - 3.79.1?

tirulirutatuutuu
Отговор
в отговор на malkia #3

Re: pod kakwa OS si?

pod linux

Shutdown The Computer;
Remove The User
Отговор
в отговор на knight_ #4

Re: makefile

cd /директорията/дето/е/мейкфайла
make

Отговор
в отговор на Penguin #5

Re:

i az taka si misleh samo deto:
portmap.c:618: warning: passing arg 6 of pointer to function from incompatible pointer type
portmap.c:619: warning: passing arg 2 of `svc_sendreply' from incompatible pointer type
make: *** [portmap.o] Error 1
i dotuk...

Shutdown The Computer;
Remove The User
Отговор
в отговор на knight_ #6

Re:

Можеш ли да пейстнеш пълния текст извеждан от make
Нещо като
make > textfile.txt 2>&1
трябва да хвърли всичко в textfile.txt. Щото само от това дето си го написал не става ясно, че проблема е в двата warning-а. Най-вероятно истинската грешка е някъде по-нагоре.

Отговор
в отговор на Penguin #7

Re:

ili probvaj da iztriesh wsichko *.o failove i izpulnimia (wsushnost ti ne go ne uspjawash da go buildnesh) i napishi

make -n > textfile.txt 2>&1 (kakto ti napisa Pengiuna)

tova shte ti izwede koi komandi trjabwa da se izpulnjat che da se kompilira faila - ako edna ot tjah wrushta neshto razlichno ot 0 to spira...

tirulirutatuutuu
Отговор
в отговор на malkia #8

Re: Error

bash-2.05a# make
cc -Dconst= -Dperror=xperror -DHOSTS_ACCESS -DCHECK_PORT -DFACILITY=LOG_MAIL -O -c -o portmap.o portmap.c
portmap.c: In function `xperror':
portmap.c:239: argument `what' doesn't match prototype
/usr/include/stdio.h:546: prototype declaration
portmap.c: In function `reg_service':
portmap.c:293: warning: passing arg 2 of `svc_sendreply' from incompatible pointer type
portmap.c:302: warning: passing arg 2 of pointer to function from incompatible pointer type
portmap.c:302: warning: passing arg 3 of pointer to function from incompatible pointer type
portmap.c:344: warning: passing arg 2 of `svc_sendreply' from incompatible pointer type
portmap.c:356: warning: passing arg 2 of pointer to function from incompatible pointer type
portmap.c:356: warning: passing arg 3 of pointer to function from incompatible pointer type
portmap.c:390: warning: passing arg 2 of `svc_sendreply' from incompatible pointer type
portmap.c:402: warning: passing arg 2 of pointer to function from incompatible pointer type
portmap.c:402: warning: passing arg 3 of pointer to function from incompatible pointer type
portmap.c:417: warning: passing arg 2 of `svc_sendreply' from incompatible pointer type
portmap.c:429: warning: passing arg 2 of pointer to function from incompatible pointer type
portmap.c:441: warning: passing arg 2 of `svc_sendreply' from incompatible pointer type
portmap.c: In function `xdr_encap_parms':
portmap.c:484: warning: passing arg 3 of `xdr_bytes' from incompatible pointer type
portmap.c: In function `callit':
portmap.c:588: warning: passing arg 2 of pointer to function from incompatible pointer type
portmap.c:588: warning: passing arg 3 of pointer to function from incompatible pointer type
portmap.c:618: warning: passing arg 3 of pointer to function from incompatible pointer type
portmap.c:618: warning: passing arg 4 of pointer to function from incompatible pointer type
portmap.c:618: warning: passing arg 5 of pointer to function from incompatible pointer type
portmap.c:618: warning: passing arg 6 of pointer to function from incompatible pointer type
portmap.c:619: warning: passing arg 2 of `svc_sendreply' from incompatible pointer type
make: *** [portmap.o] Error 1
bash-2.05a#


.o failove nyama

Shutdown The Computer;
Remove The User

Редактирано от knight_ на

Отговор
в отговор на knight_ #9

Re: Error

absolutno sushtia problem go ima opisan i tuka, razgledaj molja i thanx to google :) (napisah "portmap.c" i pregledah tretia link)

[линк]

Отговор
в отговор на malkia #10

Re: malkia

10x malkia
obache toya link deto si mi go dal ne dava otgovor na pitaneto mi zashtoto nito sym s Gnome nito pyk se optvam da patchvam
a google /tretiya link ima nyakakyv source fail koito ne e za portmap...
taka che izvinyavai ama ne razbrah kakvo se opita da mi pokazhesh...

Shutdown The Computer;
Remove The User
Отговор
в отговор на knight_ #11

fixni void perror(what) const char *what;

nameri kude e liniata sus

void perror(what)
const char *what;

i smeni const char*what na __const char* what;

Отговор