Kernel - Implimented VFS_Reopen
[tpg/acess2.git] / AcessNative / libacess-native.so_src / Makefile
1 #
2 #
3
4 ifeq ($(PLATFORM),)
5         PLATFORM := lin
6 endif
7
8 OBJ := main.o syscalls.o request.o memory.o exports.o
9 OBJ := $(addprefix obj-$(PLATFORM)/,$(OBJ))
10
11 ifeq ($(PLATFORM),win)
12         BIN := ../libacess-native.dll
13         LDFLAGS += -lws2_32
14 endif
15 ifeq ($(PLATFORM),lin)
16         BIN := ../libacess-native.so
17 endif
18
19 CFLAGS   += -Wall
20 CFLAGS   += -Werror
21 CFLAGS   += -g -shared -fPIC
22 CPPFLAGS += -DARCHDIR_is_x86_64=1
23 LDFLAGS  += -g -shared -Wl,--no-undefined -lc
24
25 DEPFILES  = $(filter %.o,$(OBJ))
26 DEPFILES := $(DEPFILES:%=%.dep)
27
28 .PHONY: all clean
29
30 all: $(BIN)
31
32 clean:
33         $(RM) $(BIN) $(OBJ) $(DEPFILES)
34
35 $(BIN): $(OBJ)
36         $(CC) -o $@ $(OBJ) $(LDFLAGS)
37         objdump -S $@ > [email protected]
38
39 obj-$(PLATFORM)/%.o: %.c
40         @mkdir -p $(dir $@)
41         @echo [CC] -o $@
42         @$(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS)
43         @$(CC) -M $(CPPFLAGS) -MT $@ -o [email protected] $<
44
45 -include $(DEPFILES)
46

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