AcessNative - Huge changes, cleaning up and getting it to work
[tpg/acess2.git] / AcessNative / acesskernel_src / Makefile
1 # AcessNative Server\r
2 # Makefile\r
3 \r
4 ifeq ($(PLATFORM),)\r
5         PLATFORM := lin\r
6 endif\r
7 \r
8 KERNEL_SRC = ../../Kernel/\r
9 \r
10 KERNEL_OBJ := logging.o adt.o lib.o drvutil.o debug.o\r
11 KERNEL_OBJ += vfs/main.o vfs/open.o vfs/acls.o vfs/io.o vfs/dir.o\r
12 KERNEL_OBJ += vfs/nodecache.o vfs/mount.o vfs/memfile.o vfs/select.o\r
13 KERNEL_OBJ += vfs/fs/root.o vfs/fs/devfs.o\r
14 KERNEL_OBJ += drv/vterm.o drv/fifo.o drv/proc.o\r
15 \r
16 OBJ := main.o helpers.o threads.o server.o syscalls.o\r
17 OBJ += video.o keyboard.o mouse.o nativefs.o vfs_handle.o ui_sdl.o\r
18 OBJ += $(addprefix $(KERNEL_SRC),$(KERNEL_OBJ))\r
19 \r
20 OBJ := $(addsuffix .$(PLATFORM),$(OBJ))\r
21 DEPFILES  = $(filter %.o.$(PLATFORM),$(OBJ))\r
22 DEPFILES := $(DEPFILES:%.o.$(PLATFORM)=%.d.$(PLATFORM))\r
23 \r
24 CPPFLAGS += -I include/ -I $(KERNEL_SRC)include/\r
25 CFLAGS += -Wall -g\r
26 LDFLAGS += -lSDL -lSDLmain -g\r
27 \r
28 ifeq ($(PLATFORM),win)\r
29         BIN := ../AcessKernel.exe\r
30 endif\r
31 ifeq ($(PLATFORM),lin)\r
32         BIN := ../AcessKernel\r
33         CFLAGS +=\r
34 endif\r
35 \r
36 .PHONY: all clean\r
37 \r
38 all: $(BIN)\r
39 \r
40 clean:\r
41         $(RM) $(BIN) $(OBJ)\r
42 \r
43 $(BIN): $(OBJ)\r
44         @echo [LINK] -o $@\r
45         @$(CC) $(LDFLAGS) -o $@ $(OBJ)\r
46 \r
47 %.o.$(PLATFORM): %.c\r
48         @echo [CC] -o $@\r
49         @$(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS)\r
50         @$(CC) -M $(CPPFLAGS) -MT $@ -o $*.d.$(PLATFORM) $<\r

UCC git Repository :: git.ucc.asn.au