8 OBJ := main.o syscalls.o request.o memory.o exports.o heap.o
9 OBJ := $(addprefix obj-$(PLATFORM)/,$(OBJ))
11 ifeq ($(PLATFORM),win)
12 BIN := ../libacess-native.dll
15 ifeq ($(PLATFORM),lin)
16 BIN := ../libacess-native.so
18 BINLINK := ../../Usermode/Output/native/Libs/$(notdir $(BIN))
23 CFLAGS += -g -shared -fPIC -std=c99
24 CPPFLAGS += -DARCHDIR_is_x86_64=1
25 LDFLAGS += -g -shared -Wl,--no-undefined -lc
27 DEPFILES = $(filter %.o,$(OBJ))
28 DEPFILES := $(DEPFILES:%=%.dep)
32 all: $(BIN) $(BINLINK)
35 $(RM) $(BIN) $(OBJ) $(DEPFILES)
38 $(CC) -o $@ $(OBJ) $(LDFLAGS)
43 @cd $(dir $@) && ln -sf ../../../../AcessNative/$(notdir $@)
45 obj-$(PLATFORM)/%.o: %.c
48 @$(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS)