1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00
sortix--sortix/libmount/Makefile
Jonas 'Sortie' Termansen e6a1cd6dee Add libmount.
2016-02-03 01:01:20 +01:00

46 lines
786 B
Makefile

SOFTWARE_MEANT_FOR_SORTIX=1
include ../build-aux/platform.mak
include ../build-aux/compiler.mak
include ../build-aux/version.mak
include ../build-aux/dirs.mak
OPTLEVEL?=$(DEFAULT_OPTLEVEL)
CFLAGS?=$(OPTLEVEL)
CFLAGS:=$(CFLAGS) -Wall -Wextra
CPPFLAGS:=$(CPPFLAGS) -Iinclude
OBJS:=\
biosboot.o \
blockdevice.o \
devices.o \
crc32.o \
ext2.o \
extended.o \
filesystem.o \
gpt.o \
harddisk.o \
mbr.o \
partition.o \
uuid.o \
all: libmount.a
.PHONY: all clean install
%.o: %.c
$(CC) $(CFLAGS) $(CPPFLAGS) -std=gnu11 -c $< -o $@
libmount.a: $(OBJS)
$(AR) rcs $@ $(OBJS)
install: libmount.a
mkdir -p $(DESTDIR)$(INCLUDEDIR)
cp -RTv include $(DESTDIR)$(INCLUDEDIR)
mkdir -p $(DESTDIR)$(LIBDIR)
cp libmount.a $(DESTDIR)$(LIBDIR)
clean:
rm -f libmount.a
rm -f $(OBJS)
rm -f *.o