Commit f74e6f4d authored by Mike Frysinger's avatar Mike Frysinger

touch up build system to respect normal toolchain env vars rather than...

touch up build system to respect normal toolchain env vars rather than requiring people to set random custom ones
parent 4db87432
...@@ -88,10 +88,9 @@ endif ...@@ -88,10 +88,9 @@ endif
# Compiler and Linker Options # Compiler and Linker Options
# You may need to uncomment and edit these if you are using libc5 and IPv6. # You may need to uncomment and edit these if you are using libc5 and IPv6.
COPTS = -D_GNU_SOURCE -O2 -Wall -g # -I/usr/inet6/include CFLAGS ?= -O2 -g
ifeq ($(origin LOPTS), undefined) CFLAGS += -Wall
LOPTS = CPPFLAGS += -D_GNU_SOURCE
endif
RESLIB = # -L/usr/inet6/lib -linet6 RESLIB = # -L/usr/inet6/lib -linet6
ifeq ($(HAVE_AFDECnet),1) ifeq ($(HAVE_AFDECnet),1)
...@@ -113,8 +112,8 @@ endif ...@@ -113,8 +112,8 @@ endif
NET_LIB = $(NET_LIB_PATH)/lib$(NET_LIB_NAME).a NET_LIB = $(NET_LIB_PATH)/lib$(NET_LIB_NAME).a
CFLAGS = $(COPTS) -I. -idirafter ./include/ -I$(NET_LIB_PATH) CPPFLAGS += -I. -idirafter ./include/ -I$(NET_LIB_PATH)
LDFLAGS = $(LOPTS) -L$(NET_LIB_PATH) LDFLAGS += -L$(NET_LIB_PATH)
SUBDIRS = man/ $(NET_LIB_PATH)/ SUBDIRS = man/ $(NET_LIB_PATH)/
...@@ -125,8 +124,6 @@ LD = $(CC) ...@@ -125,8 +124,6 @@ LD = $(CC)
NLIB = -l$(NET_LIB_NAME) NLIB = -l$(NET_LIB_NAME)
MDEFINES = COPTS='$(COPTS)' LOPTS='$(LOPTS)' TOPDIR='$(TOPDIR)'
%.o: %.c config.h version.h intl.h net-features.h $< %.o: %.c config.h version.h intl.h net-features.h $<
$(CC) $(CFLAGS) -c $< $(CC) $(CFLAGS) -c $<
...@@ -176,13 +173,13 @@ $(NET_LIB): config.h version.h intl.h libdir ...@@ -176,13 +173,13 @@ $(NET_LIB): config.h version.h intl.h libdir
i18n.h: i18ndir i18n.h: i18ndir
libdir: libdir:
@$(MAKE) -C $(NET_LIB_PATH) $(MDEFINES) @$(MAKE) -C $(NET_LIB_PATH)
i18ndir: i18ndir:
@$(MAKE) -C po @$(MAKE) -C po
subdirs: subdirs:
@for i in $(SUBDIRS); do $(MAKE) -C $$i $(MDEFINES) ; done @for i in $(SUBDIRS); do $(MAKE) -C $$i || exit $$? ; done
ifconfig: $(NET_LIB) ifconfig.o ifconfig: $(NET_LIB) ifconfig.o
$(CC) $(LDFLAGS) -o ifconfig ifconfig.o $(NLIB) $(RESLIB) $(CC) $(LDFLAGS) -o ifconfig ifconfig.o $(NLIB) $(RESLIB)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment