serenity/Demos/DynamicLink/LinkLib/Makefile
2020-01-01 22:21:50 +01:00

18 lines
496 B
Makefile

include ../../../Makefile.common
DYNLIBRARY = libDynamicLib.so
EXTRA_CLEAN = *.o *.so
.PHONY: clean all
all: $(DYNLIBRARY)
DynamicLib.o: DynamicLib.cpp
$(CXX) -DDEBUG -fPIC -isystem../../../ -o $@ -c $<
# FIXME: Why do I need -nostartfiles and -nofreestanding?
# GCC isn't smart enough to not link crt0 against this dynamic lib
# which is clearly wrong. Isn't it? We don't want _start...
$(DYNLIBRARY): DynamicLib.o
$(CXX) -shared -nostartfiles -ffreestanding -o $(DYNLIBRARY) $<