From c7bf9cc575dea15ecc8780afd34ffb3503f3249b Mon Sep 17 00:00:00 2001 From: Miguel Date: Thu, 27 Sep 2018 01:21:33 +0200 Subject: try to isolate netstack to library --- net/Makefile | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 net/Makefile (limited to 'net/Makefile') diff --git a/net/Makefile b/net/Makefile new file mode 100644 index 0000000..b8ab2b6 --- /dev/null +++ b/net/Makefile @@ -0,0 +1,92 @@ + + ############## + # Fool Stack # + ############## + +############ compiler ############ + +#use our cross compiler +CC=i686-foolos-gcc +AS=i686-foolos-as + +#sorry just this +CC=i686-elf-gcc +AS=i686-elf-as + +############ compiler flags ############ + + +#https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html + +CFLAGS= +#CFLAGS+=-fvar-tracking +#CFLAGS+=-DGIT_REVISION=\"$(GIT_REVISION)\" +CFLAGS+=-ffreestanding # do we need this if using own compiler? +CFLAGS+=-nostdlib +#CFLAGS+=-Og +CFLAGS+=-O0 +#CFLAGS+=-I. +#CFLAGS+=-I/home/miguel/temp/foolos/usr/i686-foolos/include/ +#CFLAGS+=-I./asm +#CFLAGS+=-I./kernel +#CFLAGS+=-I./driver +#CFLAGS+=-I./fs +CFLAGS+=-gstabs + +#CFLAGS+=-fstack-protector-all +#CFLAGS+=-fno-zero-initialized-in-bss +#CFLAGS+=-fdata-sections -ffunction-sections + +#CFLAGS+= -w # disable all warnings +#CFLAGS+= -Wimplicit-function-declaration +CFLAGS+= -Wall +#CFLAGS+= -Wextra +#CFLAGS+= -pedantic +CFLAGS+= -Werror +CFLAGS+= -Werror=implicit-function-declaration + +CFLAGS+= -Wno-unused-variable +CFLAGS+= -Wno-unused-function +CFLAGS+= -Wno-int-conversion +CFLAGS+= -Wno-implicit-int +CFLAGS+= -Wno-incompatible-pointer-types +CFLAGS+= -Wno-discarded-qualifiers +CFLAGS+= -Wno-unused-but-set-variable + +#CFLAGS+ = -Wall -Wextra -std=c89 -pedantic -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition + +######## linker flags #################### +LDFLAGS= +LDLIBS+=-lgcc + +########## assembler flags ################# +ASFLAGS= +ASFLAGS+=-gstabs + +########## verbosity ##################3 +#V = 0 +#CC = @echo "Compiling (i686-elf-gcc) $<..."; i686-elf-gcc +#AS = @echo "Assembling (i686-elf-as) $<..."; i686-elf-as +#CC_1 = $(CCC) +#CC = $(CC_$(V)) + +############ source and object files and their deps ############ + +#source files +SOURCES= +SOURCES+=$(wildcard *.c) + +#derive object files +OBJECTS=$(patsubst %.c, %.o, $(SOURCES)) + +#derive and include deps +DEPS=$(patsubst %.c, %.d, $(SOURCES)) + +-include $(DEPS) + +tags: + @echo "Generating ctags..."; ctags --recurse=yes . + +clean: + @echo "Cleaning..."; rm -f *.d *.o tags + -- cgit v1.2.3