Skip to content

Commit

Permalink
fix undefined referance issues
Browse files Browse the repository at this point in the history
  • Loading branch information
daTokenizer committed Nov 24, 2016
1 parent 311ab0f commit ad0bf11
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@ ifndef RMUTIL_LIBDIR
RMUTIL_LIBDIR=rmutil
endif

ifndef SRC_DIR
SRC_DIR=src
endif

all: module.so

module.so: FORCE
$(MAKE) -C ./src
cp ./src/module.so .
$(MAKE) -C ./$(SRC_DIR)
cp ./$(SRC_DIR)/module.so .

clean: FORCE
rm -rf *.xo *.so *.o
rm -rf ./src/*.xo ./src/*.so ./src/*.o
rm -rf ./$(SRC_DIR)/*.xo ./$(SRC_DIR)/*.so ./$(SRC_DIR)/*.o
rm -rf ./$(RMUTIL_LIBDIR)/*.so ./$(RMUTIL_LIBDIR)/*.o ./$(RMUTIL_LIBDIR)/*.a

FORCE:
4 changes: 2 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else
SHOBJ_CFLAGS ?= -dynamic -fno-common -g -ggdb
SHOBJ_LDFLAGS ?= -bundle -undefined dynamic_lookup
endif
CFLAGS = -I$(RM_INCLUDE_DIR) -Wall -g -fPIC -lc -lm -O3 -std=gnu99
CFLAGS = -I$(RM_INCLUDE_DIR) -Wall -g -fPIC -lc -lm -lrt -O3 -std=gnu99
CC=gcc

all: rmutil module.so
Expand All @@ -27,7 +27,7 @@ rmutil: FORCE
$(MAKE) -C $(RMUTIL_LIBDIR)

module.so: module.o
$(LD) -o $@ module.o $(SHOBJ_LDFLAGS) $(LIBS) -L$(RMUTIL_LIBDIR) -lrmutil -lc
$(LD) -o $@ module.o $(SHOBJ_LDFLAGS) $(LIBS) -L$(RMUTIL_LIBDIR) -lrmutil -lrt -lc

clean: FORCE
rm -rf *.xo *.so *.o
Expand Down
7 changes: 2 additions & 5 deletions src/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include <stdint.h>
#include <stdio.h>
#include <time.h>
#include <inttypes.h>
#include <math.h>
#include "khash.h"
#include "rmutil/util.h"
#include "rmutil/strings.h"
Expand All @@ -28,10 +30,6 @@ char* string_append(char* a, const char* b)
return retstr;
}

// #define _POSIX_C_SOURCE 200809L

#include <inttypes.h>
#include <math.h>

long long current_time_ms (void)
{
Expand All @@ -48,7 +46,6 @@ long long current_time_ms (void)
}



//##########################################################
//#
//# Linked List Definitions
Expand Down

0 comments on commit ad0bf11

Please sign in to comment.