You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
755 B

CC = gcc
TARGETS ?= netcfg-dhcp netcfg-static netcfg
LDOPTS = -ldebconfclient -ldebian-installer -liw
PREFIX = $(DESTDIR)/usr/
CFLAGS = -W -Wall
COMMON_OBJS = netcfg-common.o mii-lite.o wireless.o
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0 -g3
else
CFLAGS += -Os -fomit-frame-pointer
endif
STRIPTOOL = strip
STRIP = $(STRIPTOOL) -R .note -R .comment
all: $(TARGETS) sleep
netcfg-dhcp: netcfg-dhcp.o dhcp.o
netcfg-static: netcfg-static.o static.o
netcfg: netcfg.o dhcp.o static.o
sleep: sleep.c
$(CC) $(CFLAGS) -o $@ $<
$(STRIP) $@
$(TARGETS): $(COMMON_OBJS)
$(CC) -o $@ $^ $(LDOPTS)
$(STRIP) $@
%.o: %.c
$(CC) -c $(CFLAGS) $(DEFS) $(INCS) -o $@ $<
clean:
rm -f $(TARGETS) *.o build-stamp sleep
.PHONY: all clean