Skip to content

Commit

Permalink
build: leave alone gcc.mak [dosemu2#16]
Browse files Browse the repository at this point in the history
Create the private clang.mak.
  • Loading branch information
stsp committed Jul 18, 2018
1 parent 58b3bef commit 3a97f11
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 4 deletions.
3 changes: 0 additions & 3 deletions drivers/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,3 @@ clean:
device.lib : $(OBJS)
-$(RM) device.lib
$(LIBUTIL) $(LIBFLAGS) $@ $(LIBOBJS) $(LIBTERM)

.asm.obj:
$(NASM) -D$(COMPILER) $(NASMFLAGS) -f obj -o $@ $<
36 changes: 36 additions & 0 deletions fdpp/clang.mak
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#
# CLANG.MAK - kernel copiler options for clang
#

DIRSEP=/
RM=rm -f
CP=cp
CC=clang++ -std=c++11
CL=clang++

TARGETOPT=-c -fno-unwind-tables -fno-asynchronous-unwind-tables \
-fno-exceptions -fno-threadsafe-statics -fno-rtti -Wno-inline-new-delete
ifneq ($(XCPU),386)
$(error unsupported CPU 186)
endif

TARGET=fdppkrnl

ALLCFLAGS += -iquote ../hdr $(TARGETOPT) -Wall -fpic -O2 \
-ggdb3 -fdebug-macro -fno-strict-aliasing -Wno-format-invalid-specifier

CFLAGS=$(ALLCFLAGS)
LDFLAGS=-shared -Wl,-Bsymbolic
CLC = clang

ALLCFLAGS:=$(ALLCFLAGS) -DI386

ifeq ($(XFAT),32)
ALLCFLAGS:=$(ALLCFLAGS) -DWITHFAT32
NASMFLAGS:=$(NASMFLAGS) -DWITHFAT32
endif

NASM=$(XNASM)
NASMFLAGS := $(NASMFLAGS) -i../hdr/ -DXCPU=$(XCPU)

LINK=$(XLINK)
2 changes: 1 addition & 1 deletion fdpp/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ XNASM ?= nasm
XCPU ?= 386
XLINK = ../contrib/jwlink
XFAT ?= 32
include ../mkfiles/generic.mak
include clang.mak

LIBS=..$(DIRSEP)lib$(DIRSEP)device.lib
HDR=../hdr/
Expand Down
3 changes: 3 additions & 0 deletions mkfiles/generic.mak
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ TARGET=$(TARG)$(XCPU)$(XFAT)
endif

.SUFFIXES: .c .cpp .cc .obj .asm .o

.asm.obj:
$(NASM) -D$(COMPILER) $(NASMFLAGS) -f obj -o $@ $<

0 comments on commit 3a97f11

Please sign in to comment.