Adjusted makefiles

xethyrion-master
John Jones 2016-11-07 16:29:30 -05:00
parent 841c3f93cd
commit 8d82e8235b
20 changed files with 51 additions and 24 deletions

View File

@ -5,6 +5,7 @@ all:
cd os; make all;
cd repo; make all;
cd test; make all;
cd thirdparty; make all;
clean:
cd cmd; make clean;
@ -13,3 +14,5 @@ clean:
cd os; make clean;
cd repo; make clean;
cd test; make clean;
cd thirdparty; make clean;

View File

@ -1,7 +1,7 @@
CC = gcc
CFLAGS = -O0
LFLAGS =
DEPS = init.h
DEPS =
OBJS = init.o main.o ../../commands/argument.o
%.o: %.c $(DEPS)

View File

@ -1,7 +1,7 @@
CC = gcc
CFLAGS = -O0
CFLAGS = -O0 -I../include -I../../c-libp2p/include
LFLAGS =
DEPS = argument.h command.h request.h command_option.h
DEPS =
OBJS = argument.o command.o command_option.o
%.o: %.c $(DEPS)

View File

@ -1,7 +1,7 @@
#include <stdlib.h>
#include <string.h>
#include "argument.h"
#include "ipfs/commands/argument.h"
int uninit_argument(struct Argument* argument) {
return 1;

View File

@ -1,5 +1,5 @@
CC = gcc
CFLAGS = -O0
CFLAGS = -O0 -I../../include -I../../../c-libp2p/include
LFLAGS =
DEPS = parse.h
OBJS = parse.o

View File

@ -7,7 +7,7 @@
//
#include <stdlib.h>
#include "command.h"
#include "ipfs/commands/command.h"
int init_command(struct Command* cmd) {
// allocate memory for Argument array

View File

@ -1,5 +1,5 @@
CC = gcc
CFLAGS = -O0
CFLAGS = -O0 -I../include -I../../c-libp2p/include
LFLAGS =
DEPS = builder.h ipfs_node.h
OBJS = builder.o

View File

@ -5,8 +5,8 @@
#ifndef __COMMANDS_COMMAND_H__
#define __COMMANDS_COMMAND_H__
#include "argument.h"
#include "request.h"
#include "ipfs/commands/argument.h"
#include "ipfs/commands/request.h"
#include "command_option.h"
struct HelpText {

View File

@ -9,6 +9,8 @@
#ifndef __COMMANDS_COMMAND_OPTION_H__
#define __COMMANDS_COMMAND_OPTION_H__
#include <stdint.h>
enum Kind { invalid, boolean, integer, unsignedInt, decimal, str };
struct CommandOption {

View File

@ -1,7 +1,7 @@
CC = gcc
CFLAGS = -O0
CFLAGS = -O0 -I../include -I../../c-libp2p/include
LFLAGS =
DEPS = utils.h
DEPS =
OBJS = utils.o
%.o: %.c $(DEPS)

View File

@ -1,4 +1,4 @@
#include "utils.h"
#include "ipfs/os/utils.h"
#include <unistd.h>
#include <sys/types.h>

View File

@ -1,6 +1,6 @@
CC = gcc
CFLAGS = -O0
DEPS = repo.h
CFLAGS = -O0 -I../include -I../../c-libp2p/include
DEPS =
OBJS = repo.o
%.o: %.c $(DEPS)

View File

@ -1,5 +1,5 @@
CC = gcc
CFLAGS = -O0
CFLAGS = -O0 -I../../include -I../../../c-libp2p/include
LFLAGS =
DEPS = config.h datastore.h identity.h
OBJS = config.o

View File

@ -10,7 +10,7 @@
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include "ipfs/repo/config/config.h"
#include "ipfs/os/utils.h"
#include "ipfs/repo/config/bootstrap_peers.h"
#include "ipfs/repo/config/swarm.h"

View File

@ -1,7 +1,7 @@
CC = gcc
CFLAGS = -O0
CFLAGS = -O0 -I../../include -I../../../c-libp2p/include
LFLAGS =
DEPS = fs_repo.h
DEPS =
OBJS = fs_repo.o
%.o: %.c $(DEPS)

View File

@ -6,7 +6,7 @@
// Copyright © 2016 JMJAtlanta. All rights reserved.
//
#include "fs_repo.h"
#include "ipfs/repo/fsrepo/fs_repo.h"
#include "ipfs/os/utils.h"
/**
* private methods
@ -222,7 +222,7 @@ int fs_repo_init(char* path, struct RepoConfig* config) {
return 0;
// TODO: Implement this method
retVal = fs_repo_defaultds_init(path, config);
//retVal = fs_repo_defaultds_init(path, config);
if (retVal == 0)
return 0;

View File

@ -1,10 +1,13 @@
CC = gcc
CFLAGS = -O0
LFLAGS =
DEPS = testit.h repo/test_repo.h cmd/ipfs/test_init.h
CFLAGS = -O0 -I../include -I../../c-libp2p/include -g3
LFLAGS = -L../../c-libp2p -lp2p
DEPS =
OBJS = testit.o ../cmd/ipfs/init.o ../commands/argument.o ../commands/command_option.o \
../commands/command.o ../commands/cli/parse.o ../core/builder.o ../repo/fsrepo/fs_repo.o \
../repo/fsrepo/fs_repo.o ../repo//config/config.o ../os/utils.o
../repo/fsrepo/fs_repo.o ../repo//config/config.o ../os/utils.o ../repo/config/identity.o \
../repo/config/bootstrap_peers.o ../repo/config/datastore.o ../repo/config/gateway.o \
../repo/config/addresses.o ../repo/config/swarm.o ../repo/config/peer.o \
../thirdparty/ipfsaddr/ipfs_addr.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)

6
thirdparty/Makefile vendored Normal file
View File

@ -0,0 +1,6 @@
all:
cd ipfsaddr; make all;
clean:
cd ipfsaddr; make clean;

13
thirdparty/ipfsaddr/Makefile vendored Normal file
View File

@ -0,0 +1,13 @@
CC = gcc
CFLAGS = -O0 -I../../include -I../../../c-libp2p/include
LFLAGS =
DEPS =
OBJS = ipfsaddr.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
all: $(OBJS)
clean:
rm -f *.o