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.

53 lines
972 B
Makefile
Raw Normal View History

2017-03-23 16:26:02 +10:00
OS := $(shell uname -s)
ifeq ($(OS), FreeBSD)
CC=cc
CFLAGS=-I/usr/local/include
2017-10-20 07:27:58 +10:00
LDFLAGS=-L/usr/local/lib -lsqlite3 -lcrypto
2017-03-23 16:26:02 +10:00
endif
2017-10-18 17:18:28 +10:00
ifeq ($(OS), DragonFly)
CC=cc
CFLAGS=-I/usr/local/include
2017-10-20 07:27:58 +10:00
LDFLAGS=-L/usr/local/lib -lsqlite3 -lcrypto
2017-10-18 17:18:28 +10:00
endif
2017-03-23 16:26:02 +10:00
ifeq ($(OS), NetBSD)
CC=cc
CFLAGS=-I/usr/pkg/include
2017-10-20 07:27:58 +10:00
LDFLAGS=-R/usr/pkg/lib -L/usr/pkg/lib -lsqlite3 -lcrypto
2017-03-23 16:26:02 +10:00
endif
2018-01-19 17:13:06 +10:00
ifeq ($(OS), OpenBSD)
CC=cc
CFLAGS=-I/usr/local/include
LDFLAGS=-L/usr/local/lib -lsqlite3 -lcrypto
endif
2017-03-23 16:26:02 +10:00
ifeq ($(OS), Linux)
CC=gcc
CFLAGS=
2017-10-20 07:27:58 +10:00
LDFLAGS=-lsqlite3 -lcrypto
2017-03-23 16:26:02 +10:00
endif
ifeq ($(OS), Darwin)
CC=cc
CFLAGS=-I/opt/local/include
2017-10-20 07:27:58 +10:00
LDFLAGS=-L/opt/local/lib -lsqlite3 -lcrypto
endif
ifeq ($(OS), SunOS)
CC=gcc
CFLAGS=
LDFLAGS=-lsqlite3 -lcrypto -lsocket -lnsl
2017-03-23 16:26:02 +10:00
endif
DEPS = magiftpd.c
2017-09-25 13:27:22 +10:00
OBJ = magiftpd.o ../../src/inih/ini.o
2017-03-23 16:26:02 +10:00
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
2017-03-23 16:33:05 +10:00
magiftpd: $(OBJ)
2017-10-20 07:27:58 +10:00
$(CC) -o magiftpd $^ $(CFLAGS) $(LDFLAGS)
2017-03-23 16:26:02 +10:00
.PHONY: clean
clean:
rm -f $(OBJ) magiftpd