File: Makefile

package info (click to toggle)
netcat-openbsd 1.195-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,320 kB
  • sloc: ansic: 28,778; sh: 429; makefile: 71
file content (20 lines) | stat: -rw-r--r-- 386 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#	$OpenBSD: Makefile,v 1.7 2015/09/11 21:07:01 beck Exp $

PROG=	nc
SRCS=	netcat.c atomicio.c socks.c

PKG_CONFIG ?= pkg-config
LIBS=  `$(PKG_CONFIG) --libs libbsd` -lresolv
OBJS=  $(SRCS:.c=.o)
CFLAGS=  -g -O2
LDFLAGS=  -Wl,--no-add-needed

all: nc
nc: $(OBJS)
	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o nc

$(OBJS): %.o: %.c
	$(CC) $(CFLAGS) -c $< -o $@

clean:
	rm -f $(OBJS) nc