Forráskód Böngészése

[C] Adding Solution for Problem 0010

Vinicius Teshima 1 éve
szülő
commit
7bde94a7c8
3 módosított fájl, 18 hozzáadás és 6 törlés
  1. 2 1
      c/.gitignore
  2. 9 4
      c/Makefile
  3. 7 1
      c/Project.ede

+ 2 - 1
c/.gitignore

@@ -10,4 +10,5 @@
 0006
 0007
 0008
-0009
+0009
+0010

+ 9 - 4
c/Makefile

@@ -6,7 +6,7 @@
 # EDE is the Emacs Development Environment.
 # https://cedet.sourceforge.net/ede.shtml
 #
-CFLAGS=-std=c89 -m64 -Og -ggdb -pedantic -Wall -Wextra -Wshadow -Wcast-align -Wunused -Wconversion -Wmisleading-indentation -Wdouble-promotion -Wformat=2 -Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Werror $(shell pkg-config --libs ${LIBS}) -I src/external -fsanitize=address
+CFLAGS=-std=c89 -m64 -Og -ggdb -pedantic -Wall -Wextra -Wshadow -Wcast-align -Wunused -Wconversion -Wmisleading-indentation -Wdouble-promotion -Wformat=2 -Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Werror $(shell pkg-config --libs ${LIBS}) -I ./ -fsanitize=address
 
 top=
 ede_FILES=Project.ede Makefile
@@ -33,13 +33,15 @@ C_LINK=$(CC) $(CFLAGS) $(LDFLAGS) -L.
 0008_OBJ= 0008.o
 0009_SOURCES=0009.c
 0009_OBJ= 0009.o
+0010_SOURCES=0010.c
+0010_OBJ= 0010.o
 VERSION=1.0
 DISTDIR=$(top)ProjectEuler_C-$(VERSION)
 top_builddir = 
 
-DEP_FILES=.deps/0001.P .deps/0002.P .deps/0003.P .deps/0004.P .deps/0005.P .deps/0006.P .deps/0007.P .deps/0008.P .deps/0009.P
+DEP_FILES=.deps/0001.P .deps/0002.P .deps/0003.P .deps/0004.P .deps/0005.P .deps/0006.P .deps/0007.P .deps/0008.P .deps/0009.P .deps/0010.P
 
-all: 0001 0002 0003 0004 0005 0006 0007 0008 0009
+all: 0001 0002 0003 0004 0005 0006 0007 0008 0009 0010
 
 DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
 -include $(DEP_FILES)
@@ -75,6 +77,9 @@ DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
 0009: $(0009_OBJ)
 	$(C_LINK) -o $@ $^ $(LDDEPS)
 
+0010: $(0010_OBJ)
+	$(C_LINK) -o $@ $^ $(LDDEPS)
+
 tags: 
 
 
@@ -85,7 +90,7 @@ clean:
 
 dist:
 	mkdir $(DISTDIR)
-	cp $(0001_SOURCES) $(0002_SOURCES) $(0003_SOURCES) $(0004_SOURCES) $(0005_SOURCES) $(0006_SOURCES) $(0007_SOURCES) $(0008_SOURCES) $(0009_SOURCES) $(ede_FILES) $(DISTDIR)
+	cp $(0001_SOURCES) $(0002_SOURCES) $(0003_SOURCES) $(0004_SOURCES) $(0005_SOURCES) $(0006_SOURCES) $(0007_SOURCES) $(0008_SOURCES) $(0009_SOURCES) $(0010_SOURCES) $(ede_FILES) $(DISTDIR)
 
 Makefile: Project.ede
 	@echo Makefile is out of date!  It needs to be regenerated by EDE.

+ 7 - 1
c/Project.ede

@@ -58,10 +58,16 @@
       :name "0009"
       :path ""
       :source '("0009.c")
+      :configuration-variables '("debug" ("CFLAGS" . "-g") ("LDFLAGS" . "-g")))
+    (ede-proj-target-makefile-program "0010"
+      :object-name "0010"
+      :name "0010"
+      :path ""
+      :source '("0010.c")
       :configuration-variables '("debug" ("CFLAGS" . "-g") ("LDFLAGS" . "-g"))))
   :configurations '("debug" "release")
   :object-name "ProjectEuler_C"
   :makefile-type Makefile
-  :variables '(("CFLAGS" . "-std=c89 -m64 -Og -ggdb -pedantic -Wall -Wextra -Wshadow -Wcast-align -Wunused -Wconversion -Wmisleading-indentation -Wdouble-promotion -Wformat=2 -Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Werror $(shell pkg-config --libs ${LIBS}) -I src/external -fsanitize=address"))
+  :variables '(("CFLAGS" . "-std=c89 -m64 -Og -ggdb -pedantic -Wall -Wextra -Wshadow -Wcast-align -Wunused -Wconversion -Wmisleading-indentation -Wdouble-promotion -Wformat=2 -Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Werror $(shell pkg-config --libs ${LIBS}) -I ./ -fsanitize=address"))
   :configuration-variables nil
   :metasubproject t)