newlisp/makefile_linux_openwrt

28 lines
935 B
Text
Raw Normal View History

2016-06-11 17:22:37 +00:00
# makefile for newLISP v.10.x.x on Openwrt LINUX without readline support
# contributed by dexter (see newLISP Forum)
# upx is used to compress
# no readline support, add -DSUPPORT_UTF8 to CFLAGS for UTF8 support
#
OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o \
nl-sock.o nl-import.o nl-xml-json.o nl-web.o nl-matrix.o nl-debug.o pcre.o
DEFAULT_CFLAGS = -Wall -Wl,--gc-sections -ffunction-sections -fdata-sections -c -Os -fno-threadsafe-statics -DLINUX -I$(TARGET_DIR)/usr/include/ $(CFLAGS)
2016-06-11 17:22:37 +00:00
LDFLAGS = -L$(TARGET_DIR)/usr/lib/ -W1,--gc-sections -lm -ldl
CC = mips-openwrt-linux-gcc
LD = mips-openwrt-linux-ld
default: $(OBJS)
$(CC) $(OBJS) -o newlisp $(LDFLAGS) #for openwrt
$(STRIP) newlisp
upx --best -o newlisp_s newlisp
rm newlisp
mv newlisp_s newlisp
.c.o:
$(CC) $(DEFAULT_CFLAGS) $<
2016-06-11 17:22:37 +00:00
$(OBJS): primes.h protos.h makefile_linux_openwrt