Adjusted makefiles

This commit is contained in:
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 os; make all;
cd repo; make all; cd repo; make all;
cd test; make all; cd test; make all;
cd thirdparty; make all;
clean: clean:
cd cmd; make clean; cd cmd; make clean;
@ -13,3 +14,5 @@ clean:
cd os; make clean; cd os; make clean;
cd repo; make clean; cd repo; make clean;
cd test; make clean; cd test; make clean;
cd thirdparty; make clean;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,10 +1,13 @@
CC = gcc CC = gcc
CFLAGS = -O0 CFLAGS = -O0 -I../include -I../../c-libp2p/include -g3
LFLAGS = LFLAGS = -L../../c-libp2p -lp2p
DEPS = testit.h repo/test_repo.h cmd/ipfs/test_init.h DEPS =
OBJS = testit.o ../cmd/ipfs/init.o ../commands/argument.o ../commands/command_option.o \ 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 \ ../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) %.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS) $(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