initial (partial) commit
This commit is contained in:
commit
ec15d449e1
11 changed files with 2789 additions and 0 deletions
32
src/libmsettings/makefile
Normal file
32
src/libmsettings/makefile
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
ifeq (,$(CROSS_COMPILE))
|
||||
$(error missing CROSS_COMPILE for this toolchain)
|
||||
endif
|
||||
ifeq (,$(PREFIX))
|
||||
$(error missing PREFIX for this toolchain)
|
||||
endif
|
||||
|
||||
TARGET=msettings
|
||||
|
||||
.PHONY: build
|
||||
.PHONY: clean
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
|
||||
SYSROOT := $(shell $(CC) --print-sysroot)
|
||||
|
||||
INCLUDEDIR = $(SYSROOT)/usr/include
|
||||
CFLAGS = -I$(INCLUDEDIR)
|
||||
LDFLAGS = -ldl -lrt -s
|
||||
|
||||
OPTM=-Ofast
|
||||
|
||||
build:
|
||||
$(CC) -c -Werror -fpic "$(TARGET).c" -Wl,--no-as-needed $(LDFLAGS)
|
||||
$(CC) -shared -o "lib$(TARGET).so" "$(TARGET).o" $(LDFLAGS)
|
||||
cp "$(TARGET).h" "$(PREFIX)/include"
|
||||
cp "lib$(TARGET).so" "$(PREFIX)/lib"
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f "lib$(TARGET).so"
|
||||
rm -f $(PREFIX)/include/$(TARGET).h
|
||||
rm -f $(PREFIX)/lib/lib$(TARGET).so
|
||||
Loading…
Add table
Add a link
Reference in a new issue