This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
magicka/utils/mnetftpc/Makefile

56 lines
1.3 KiB
Makefile
Raw Normal View History

2018-05-27 01:22:29 +00:00
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
2018-05-26 23:42:41 +00:00
DEPS = mnetftpc.c
LIBFTP = ../../deps/ftplib-4.0-1/src/libftp.a
OBJ = mnetftpc.o
all: mnetftpc
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
$(LIBFTP):
2018-05-27 01:16:45 +00:00
cd ../../deps/ftplib-4.0-1/src && $(MAKE) libftp.a
2018-05-26 23:42:41 +00:00
mnetftpc: $(OBJ) $(LIBFTP)
2018-05-27 01:22:29 +00:00
$(CC) -o mnetftpc $^ -L/usr/local/lib $(LDFLAGS)
2018-05-26 23:42:41 +00:00
.PHONY: clean
clean:
rm -f $(OBJ) mnetftpc