59 lines · 1.5 KB · Makefile
RawDownload
RANLIB      ?=ranlibAR          ?=ar MACHINE         := $(shell $(CC) -dumpmachine)ifneq (, $(findstring darwin, $(MACHINE)))	OS      :=darwinelse ifneq (, $(findstring cygwin, $(MACHINE)))	OS      :=windowselse ifneq (, $(findstring mingw, $(MACHINE)))	OS      :=windowselse ifneq (, $(findstring windows, $(MACHINE)))	OS      :=windowselse	OS      :=unixendif SHLIB_SUFFIX    :=.so LIBNAME=idris_netOBJS = $(LIBNAME).oHDRS = $(LIBNAME).hCFLAGS := $(CFLAGS)IDRIS_SRCS = Network/Socket.idr Network/Socket/Data.idr Network/Socket/Raw.idr ifneq ($(OS), windows)	CFLAGS += -fPICendif DYLIBTARGET = $(LIBNAME)$(SHLIB_SUFFIX)LIBTARGET = $(LIBNAME).aTARGET=`${IDRIS2} --libdir` build: $(DYLIBTARGET) $(IDRIS_SRCS)	@if [ -z "${IDRIS2}" ]; then echo 'variable $$IDRIS2 is not set, aborting'; exit 1; fi	${IDRIS2} --build network.ipkg $(DYLIBTARGET) : $(OBJS)	$(CC) -o $(DYLIBTARGET) $(LIBFLAGS) -shared $(OBJS) install:	@if [ -z "${IDRIS2}" ]; then echo 'variable $$IDRIS2 is not set, aborting'; exit 1; fi	${IDRIS2} --install network.ipkg	@if ! [ -d $(TARGET)/network/lib ]; then mkdir $(TARGET)/network/lib; fi	install $(DYLIBTARGET) $(HDRS) $(TARGET)/network/lib clean :	rm -rf $(OBJS) $(LIBTARGET) $(DYLIBTARGET) build test: build test.c	$(CC) -o network-tests -L. -I. test.c $(DYLIBTARGET)	LD_LIBRARY_PATH=. ./network-tests	@rm -f ./network-tests $(OBJS): $(HDRS) all: $(DYLIBTARGET) $(LIBTARGET)	${IDRIS2} --build network.ipkg .PHONY: install clean

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t