AcessNative - Spawn in libacess-native (with AN_GETPATH syscall)
[tpg/acess2.git] / AcessNative / libacess-native.so_src / Makefile
index 0a074a6..9278311 100644 (file)
@@ -5,7 +5,7 @@ ifeq ($(PLATFORM),)
        PLATFORM := lin
 endif
 
-OBJ := main.o syscalls.o request.o memory.o exports.o
+OBJ := main.o syscalls.o request.o memory.o exports.o heap.o
 OBJ := $(addprefix obj-$(PLATFORM)/,$(OBJ))
 
 ifeq ($(PLATFORM),win)
@@ -15,6 +15,8 @@ endif
 ifeq ($(PLATFORM),lin)
        BIN := ../libacess-native.so
 endif
+BINLINK := ../../Usermode/Output/native/Libs/$(notdir $(BIN))
+$(warning $(BINLINK))
 
 CFLAGS   += -Wall
 CFLAGS   += -Werror
@@ -27,7 +29,7 @@ DEPFILES := $(DEPFILES:%=%.dep)
 
 .PHONY: all clean
 
-all: $(BIN)
+all: $(BIN) $(BINLINK)
 
 clean:
        $(RM) $(BIN) $(OBJ) $(DEPFILES)
@@ -36,6 +38,10 @@ $(BIN): $(OBJ)
        $(CC) -o $@ $(OBJ) $(LDFLAGS)
        objdump -S $@ > [email protected]
 
+$(BINLINK): $(BIN)
+       @mkdir -p $(dir $@)
+       @cd $(dir $@) && ln -sf ../../../../AcessNative/$(notdir $@)
+
 obj-$(PLATFORM)/%.o: %.c
        @mkdir -p $(dir $@)
        @echo [CC] -o $@

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