1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

add example to create an HermitCore App with Intel's C compiler

This commit is contained in:
Stefan Lankes 2016-05-20 23:03:30 +02:00
parent 86fd7789df
commit 5cc31057d5

View file

@ -29,6 +29,13 @@ ifeq ($V,0)
P = > /dev/null
endif
INTEL = 0
ifeq ($INTEL,0)
ICC_EXE =
else
ICC_EXE = stream_icc
endif
# other implicit rules
%.o : %.c
@echo [CC] $@
@ -44,7 +51,7 @@ endif
default: all
all: stream hg netio RCCE_pingping RCCE_pingpong basic
all: stream hg netio RCCE_pingping RCCE_pingpong basic $(ICC_EXE)
stream.o: stream.c
@echo [CC] $@
@ -57,6 +64,18 @@ stream: stream.o
$Q$(OBJCOPY_FOR_TARGET) $(STRIP_DEBUG) $@
$Qchmod a-x $@.sym
stream_icc.o: stream.c
@echo [ICC] $@
icc -m64 -c -o $@ -mno-red-zone -O3 -xHost -fno-stack-protector -I$(TOPDIR)/hermit/usr/x86/x86_64-hermit/include/ -openmp -ffreestanding $<
$Q$(ELFEDIT_FOR_TARGET) --output-osabi HermitCore $@
stream_icc: stream_icc.o
@echo [LD]
$Q$(CC_FOR_TARGET) -o $@ $< $(LDFLAGS_FOR_TARGET) $(CFLAGS_FOR_TARGET) -fopenmp
$Q$(OBJCOPY_FOR_TARGET) $(KEEP_DEBUG) $@ $@.sym
$Q$(OBJCOPY_FOR_TARGET) $(STRIP_DEBUG) $@
$Qchmod a-x $@.sym
basic.o: basic.c
@echo [CC] $@
$Q$(CC_FOR_TARGET) -c $(CFLAGS_FOR_TARGET) -pthread -o $@ $<