Newer
Older
Scratch / mobius / src / kernelu / Makefile
@Christopher W. Olsen Christopher W. Olsen on 25 Oct 2019 641 bytes Scratch
TARGET=	$(BIN)/kernelu.dll
OBJS=	except.o fs.o fullpath.o main.o \
	obj.o proc.o resource.o sys.o \
	thread.o vmm.o device.o debug.o \
	port.o console.o handle.o
EXP=	kernelu.exp
IMP=	$(LIB)/kernelu.lib
CFLAGS=	-g

include ../make.actions

all:	$(TARGET) $(IMP)

$(TARGET):	$(OBJS) $(EXP) kernelu.res.o Makefile
	ld -o $(TARGET) -g \
		$(OBJS) $(EXP) ../crt0dll.o kernelu.res.o \
		$(LIB)/libc_s.lib \
		--image-base 0x10030000 --entry _DllMainCRTStartup@12

%.exp: %.def
	dlltool -e $@ -m i386 --input-def $< -D $(EXP:.exp=.dll)

$(LIB)/%.lib: %.def Makefile
	dlltool -l $@ -m i386 --input-def $< -D $(EXP:.exp=.dll)

include $(OBJS:.o=.d)