Update makefile
This commit is contained in:
parent
907e2f92c1
commit
22277f7393
@ -1,5 +1,40 @@
|
||||
OS := $(shell uname -s)
|
||||
|
||||
ifeq ($(OS), FreeBSD)
|
||||
CC=cc
|
||||
CFLAGS=-I/usr/local/include -I../../deps/ -I../../deps/ftplib-4.0-1/src
|
||||
LDFLAGS=-L/usr/local/lib
|
||||
endif
|
||||
ifeq ($(OS), DragonFly)
|
||||
CC=cc
|
||||
CFLAGS=-I/usr/local/include -I../../deps/ -I../../deps/ftplib-4.0-1/src
|
||||
LDFLAGS=-L/usr/local/lib
|
||||
endif
|
||||
ifeq ($(OS), NetBSD)
|
||||
CC=cc
|
||||
CFLAGS=-I/usr/local/include -I../../deps/ -I../../deps/ftplib-4.0-1/src
|
||||
LDFLAGS=-R/usr/pkg/lib -L/usr/pkg/lib
|
||||
endif
|
||||
ifeq ($(OS), OpenBSD)
|
||||
CC=cc
|
||||
CFLAGS=-I/usr/local/include -I../../deps/ -I../../deps/ftplib-4.0-1/src
|
||||
LDFLAGS=-L/usr/local/lib
|
||||
endif
|
||||
ifeq ($(OS), Linux)
|
||||
CC=gcc
|
||||
CFLAGS=-I/usr/local/include -I../../deps/ -I../../deps/ftplib-4.0-1/src
|
||||
LDFLAGS=
|
||||
endif
|
||||
ifeq ($(OS), Darwin)
|
||||
CC=cc
|
||||
CFLAGS=-I/usr/local/include -I../../deps/ -I../../deps/ftplib-4.0-1/src
|
||||
LDFLAGS=
|
||||
endif
|
||||
ifeq ($(OS), SunOS)
|
||||
CC=gcc
|
||||
CFLAGS=-I/usr/local/include -I../../deps/ -I../../deps/ftplib-4.0-1/src
|
||||
LDFLAGS=-lsocket -lnsl -lresolv
|
||||
endif
|
||||
DEPS = mnetftpc.c
|
||||
LIBFTP = ../../deps/ftplib-4.0-1/src/libftp.a
|
||||
OBJ = mnetftpc.o
|
||||
@ -13,7 +48,7 @@ $(LIBFTP):
|
||||
cd ../../deps/ftplib-4.0-1/src && $(MAKE) libftp.a
|
||||
|
||||
mnetftpc: $(OBJ) $(LIBFTP)
|
||||
$(CC) -o mnetftpc $^ $(CFLAGS) -L/usr/local/lib
|
||||
$(CC) -o mnetftpc $^ -L/usr/local/lib $(LDFLAGS)
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
|
Reference in New Issue
Block a user