Remove all C related project files
* + force add checks folder to be kept
This commit is contained in:
parent
062be17018
commit
1b9c62fd51
@ -1,19 +0,0 @@
|
||||
[Buildset]
|
||||
BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00\n\x00t\x00o\x00o\x00l\x00s)
|
||||
|
||||
[CustomDefinesAndIncludes][ProjectPath0]
|
||||
Path=.
|
||||
parseAmbiguousAsCPP=true
|
||||
parserArguments=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c++11
|
||||
parserArgumentsC=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c99
|
||||
parserArgumentsCuda=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c++11
|
||||
parserArgumentsOpenCL=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -cl-std=CL1.1
|
||||
|
||||
[CustomDefinesAndIncludes][ProjectPath0][Compiler]
|
||||
Name=Clang
|
||||
|
||||
[CustomDefinesAndIncludes][ProjectPath0][Includes]
|
||||
1=/home/martin/Desktop/DRUNK/tools/include
|
||||
|
||||
[Project]
|
||||
VersionControlSupport=kdevgit
|
39
Makefile
39
Makefile
@ -1,39 +0,0 @@
|
||||
# Exports
|
||||
PREFIX = $(shell pwd)
|
||||
OUT = $(PREFIX)/src/out
|
||||
|
||||
# Flags for compiler / linker
|
||||
CFALGS = -Wall -Werror
|
||||
LDFLAGS = -L$(LD_LIBS)
|
||||
|
||||
# Compiler / linker
|
||||
CC = /usr/bin/gcc
|
||||
LD_LIBS = $(PREFIX)/libs
|
||||
LD = /usr/bin/gcc
|
||||
|
||||
.PHONY: all
|
||||
|
||||
all: clean compile link symlink
|
||||
@echo "Pre-setup is now done!"
|
||||
@echo "cd to root of porject and run './drunk --help' for more information"
|
||||
|
||||
clean:
|
||||
@mkdir -p $(OUT) libs
|
||||
@rm -rf $(OUT)/* libs/*
|
||||
|
||||
compile:
|
||||
# libdrunk.so
|
||||
$(CC) -c $(CFLAGS) -fpic -o $(OUT)/libdrunk_msg.o src/libdrunk_msg.c
|
||||
$(CC) -c $(CFLAGS) -fpic -o $(OUT)/libdrunk.o src/libdrunk.c
|
||||
|
||||
link:
|
||||
# libdrunk.so
|
||||
$(LD) $(LDFLAGS) -shared -o libs/libdrunk.so $(OUT)/libdrunk_msg.o $(OUT)/libdrunk.o
|
||||
|
||||
# Main executable
|
||||
$(CC) -Wall $(LDFLAGS) --debug -o libs/drunk src/main.c -Wl,-rpath=lib -ldrunk
|
||||
|
||||
symlink:
|
||||
@rm $(PREFIX)/../drunk
|
||||
@ln -sf $(PREFIX)/libs/drunk $(PREFIX)/drunk
|
||||
@ln -sf $(PREFIX)/drunk $(PREFIX)/../drunk
|
1
checks/.gitkeep
Normal file
1
checks/.gitkeep
Normal file
@ -0,0 +1 @@
|
||||
|
15
drunk.sh
15
drunk.sh
@ -85,6 +85,21 @@ export ARCH=$(cat $P_ROOT/tools/tmp/is_arch)
|
||||
# Feed mkiso creator module
|
||||
source $P_ROOT/tools/shell/modules/mk_iso.sh
|
||||
|
||||
# Feed mkiso creator module
|
||||
source $P_ROOT/tools/shell/modules/dialog_manager.sh
|
||||
|
||||
# Read the filename which is named by symlink
|
||||
|
||||
tmp010=$(basename $0)
|
||||
|
||||
if [ "$tmp010" = "dialog" ]; then
|
||||
# If match then run dialog
|
||||
dialog_main
|
||||
|
||||
# After good exit clean the tmp
|
||||
clean_tmp
|
||||
fi
|
||||
|
||||
##
|
||||
# Main Functions
|
||||
##
|
||||
|
@ -1,19 +0,0 @@
|
||||
#ifndef DRUNK_H_
|
||||
#define DRUNK_H_
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
extern void build_package(char* str);
|
||||
extern char* const packages;
|
||||
extern void konsole_run(char* str);
|
||||
extern void enable_debug();
|
||||
|
||||
extern bool is_debug;
|
||||
extern bool enable_build;
|
||||
|
||||
bool is_debug = false;
|
||||
bool enable_build = false;
|
||||
|
||||
#endif // DRUNK_H_
|
@ -1,16 +0,0 @@
|
||||
#ifndef MSG_TYPE_H_
|
||||
#define MSG_TYPE_H_
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "../include/drunk.h"
|
||||
|
||||
extern void drunk_msg(char* str);
|
||||
extern void drunk_msg_2(char* str, char* str2);
|
||||
|
||||
extern void drunk_debug(char* str);
|
||||
extern void drunk_debug_2(char* str, char* str2);
|
||||
|
||||
extern void show_help(void);
|
||||
|
||||
#endif // MSG_TYPE_H_
|
@ -20,7 +20,7 @@ docker_initial_setup() {
|
||||
sleep 1
|
||||
|
||||
# Setup base docker container
|
||||
#docker_setup_container
|
||||
docker_setup_container
|
||||
|
||||
# Start our new container
|
||||
docker_container_start
|
||||
@ -55,6 +55,9 @@ docker_initial_sysedit() {
|
||||
# Add developer user ( used to build pkg's without root
|
||||
docker_run_cmd useradd developer -m -g wheel
|
||||
|
||||
# Copy over local bottle.conf
|
||||
docker_run_cmd cp -f /home/developer/DRUNK/tools/docker/bottle.conf /etc/bottle.conf
|
||||
|
||||
# Perms fixes + bottle changes
|
||||
docker_run_cmd bash -c /home/developer/DRUNK/tools/docker/developer.sh
|
||||
|
||||
|
@ -1,53 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "../include/msg_type.h"
|
||||
#include "../include/drunk.h"
|
||||
|
||||
////
|
||||
// Build system
|
||||
////
|
||||
void build_package(char* str) {
|
||||
char* const packages = str;
|
||||
drunk_msg("debugger flag is set second time");
|
||||
printf("%d", is_debug);
|
||||
putchar('\n');
|
||||
|
||||
drunk_msg_2("List of package's to build: ", packages);
|
||||
|
||||
// Start of the build system
|
||||
konsole_run("''");
|
||||
|
||||
}
|
||||
|
||||
void konsole_run(char* str) {
|
||||
|
||||
// Make sure to use it like this
|
||||
// konsole_run("'ls && pwd'");
|
||||
|
||||
char cmd[256];
|
||||
strcpy(cmd ,str);
|
||||
|
||||
char base[] = "dbus-launch /usr/bin/konsole --hold --separate -e /bin/bash -c ";
|
||||
strcat(base, cmd);
|
||||
|
||||
drunk_msg(base);
|
||||
|
||||
system(base);
|
||||
}
|
||||
|
||||
////
|
||||
// Usual things here
|
||||
////
|
||||
void show_help(void) {
|
||||
drunk_msg( "------------ HELP MENU \n");
|
||||
drunk_msg("--debug : Will enable debug messages");
|
||||
drunk_msg("--docker : Will enable docker usage");
|
||||
drunk_msg("--build : Will build the requested packages");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void enable_debug() {
|
||||
is_debug = true;
|
||||
return;
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include "../include/drunk.h"
|
||||
|
||||
void drunk_msg(char* str) {
|
||||
char string[256];
|
||||
strcpy(string ,str);
|
||||
|
||||
printf("\033[0;32m");
|
||||
printf("%s", string);
|
||||
printf("\033[0;37m");
|
||||
|
||||
putchar('\n');
|
||||
}
|
||||
|
||||
void drunk_msg_2(char* str, char* str2) {
|
||||
char string[256];
|
||||
char string2[256];
|
||||
|
||||
strcpy(string ,str);
|
||||
strcpy(string2 ,str2);
|
||||
|
||||
printf("\033[0;32m");
|
||||
printf("%s", string);
|
||||
printf("%s", string2);
|
||||
printf("\033[0;37m");
|
||||
|
||||
putchar('\n');
|
||||
}
|
||||
|
||||
void drunk_debug(char* str) {
|
||||
char string[256];
|
||||
strcpy(string ,str);
|
||||
|
||||
extern bool is_debug;
|
||||
extern bool enable_build;
|
||||
|
||||
if (is_debug == true) {
|
||||
printf("\033[0;32m");
|
||||
printf("%s", string);
|
||||
printf("\033[0;37m");
|
||||
|
||||
putchar('\n');
|
||||
}
|
||||
}
|
||||
|
||||
void drunk_debug_2(char* str, char* str2) {
|
||||
char string[256];
|
||||
char string2[256];
|
||||
|
||||
extern bool is_debug;
|
||||
extern bool enable_build;
|
||||
|
||||
if (is_debug == true) {
|
||||
strcpy(string ,str);
|
||||
strcpy(string2 ,str2);
|
||||
|
||||
printf("\033[0;32m");
|
||||
printf("%s", string);
|
||||
printf("%s", string2);
|
||||
printf("\033[0;37m");
|
||||
|
||||
putchar('\n');
|
||||
}
|
||||
}
|
61
src/main.c
61
src/main.c
@ -1,61 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <getopt.h>
|
||||
#include "../include/msg_type.h"
|
||||
#include "../include/drunk.h"
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
static struct option long_options[] =
|
||||
{
|
||||
{"debug", no_argument, 0, '1'},
|
||||
{"help", no_argument, 0, '2'},
|
||||
{"build", 0, 0, '3'},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
/* getopt_long stores the option index here. */
|
||||
int option_index = 0;
|
||||
|
||||
int c = getopt_long (argc, argv, "",
|
||||
long_options, &option_index);
|
||||
|
||||
/* Detect the end of the options. */
|
||||
if (c == -1)
|
||||
break;
|
||||
|
||||
switch (c) {
|
||||
case '1':
|
||||
enable_debug;
|
||||
|
||||
drunk_msg("debugger flag is set");
|
||||
printf("%d", is_debug);
|
||||
putchar('\n');
|
||||
break;
|
||||
case '2':
|
||||
show_help();
|
||||
break;
|
||||
case '3':
|
||||
enable_build = true;
|
||||
break;
|
||||
case '?':
|
||||
drunk_msg ("Unknown option\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
|
||||
/* Print any remaining command line arguments (not options). */
|
||||
if (optind < argc)
|
||||
{
|
||||
while (optind < argc)
|
||||
if (enable_build == true) {
|
||||
build_package(argv[optind++]);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
[Project]
|
||||
CreatedFrom=
|
||||
Manager=KDevCustomBuildSystem
|
||||
Name=tools
|
Loading…
Reference in New Issue
Block a user