mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-08 14:51:32 +00:00
Plenty of bugfixes for Linux kernel later than 3.5 and Ubuntu later than 10.10. More organized code to improve portability. Regression tests for Pal to test completeness of implementation.
41 lines
891 B
Makefile
41 lines
891 B
Makefile
SYS ?= $(shell gcc -dumpmachine)
|
|
|
|
CC = gcc
|
|
CFLAGS = -Wall -O2 -std=gnu99 -fgnu89-inline -fno-builtin -nostdlib \
|
|
-I../include/pal -I../lib
|
|
|
|
executables = HelloWorld File Failure Thread Fork Event Process Exception \
|
|
Memory Pipe Tcp Udp Yield Broadcast Ipc Server Wait HandleSend \
|
|
Select Segment
|
|
manifests = manifest
|
|
|
|
target = $(executables) $(manifests)
|
|
|
|
graphene_lib = ../lib/graphene-lib.a
|
|
pal_lib = ../src/libpal.so
|
|
headers = $(wildcard ../include/pal/*.h)
|
|
|
|
all: $(target)
|
|
|
|
debug: CC=gcc -g
|
|
debug: $(target)
|
|
|
|
manifest: manifest.template
|
|
cp -f manifest.template manifest
|
|
|
|
ifeq ($(SYS),x86_64-linux-gnu)
|
|
$(executables): %: %.c $(graphene_lib) $(pal_lib) ../src/user_start.o
|
|
@echo [ $@ ]
|
|
@$(CC) $(CFLAGS) $^ -o $@
|
|
|
|
.PHONY: pack
|
|
pack: $(executables)
|
|
tar -czf .packed/test.tar.gz $^
|
|
else
|
|
$(executables): .packed/test.tar.gz
|
|
tar -xmozf $<
|
|
endif
|
|
|
|
clean:
|
|
rm -rf $(target)
|