Merge branch 'main' of git.lug.uniroma2.it:rexeref/productManager
This commit is contained in:
commit
90b4e7db00
13 files changed
+25
-9
No files matched your search
@@ -1 +1,4 @@
|
|||||||
build/
|
build/
|
||||||
|
.vscode
|
||||||
|
productManager
|
||||||
|
test
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
build/globals.o: src/globals.c src/../include/globals.h
|
||||||
|
src/../include/globals.h:
|
||||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
|||||||
|
build/logic.o: src/logic.c src/../include/logic.h \
|
||||||
|
src/../include/globals.h
|
||||||
|
src/../include/logic.h:
|
||||||
|
src/../include/globals.h:
|
||||||
Binary file not shown.
@@ -0,0 +1,3 @@
|
|||||||
|
build/main.o: src/main.c include/windows.h include/logic.h
|
||||||
|
include/windows.h:
|
||||||
|
include/logic.h:
|
||||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
|||||||
|
build/testLogic.o: src/testLogic.c src/../include/logic.h \
|
||||||
|
src/../include/globals.h
|
||||||
|
src/../include/logic.h:
|
||||||
|
src/../include/globals.h:
|
||||||
Binary file not shown.
@@ -0,0 +1,5 @@
|
|||||||
|
build/windows.o: src/windows.c src/../include/windows.h \
|
||||||
|
src/../include/logic.h src/../include/globals.h
|
||||||
|
src/../include/windows.h:
|
||||||
|
src/../include/logic.h:
|
||||||
|
src/../include/globals.h:
|
||||||
Binary file not shown.
@@ -3,34 +3,26 @@ CFLAGS = -I./include -Wall -Wextra -MMD -MP
|
|||||||
LDLIBS = -lncurses
|
LDLIBS = -lncurses
|
||||||
SRC_DIR = src
|
SRC_DIR = src
|
||||||
BUILD_DIR = build
|
BUILD_DIR = build
|
||||||
|
|
||||||
SOURCES = $(filter-out $(SRC_DIR)/testLogic.c, $(wildcard $(SRC_DIR)/*.c))
|
SOURCES = $(filter-out $(SRC_DIR)/testLogic.c, $(wildcard $(SRC_DIR)/*.c))
|
||||||
OBJECTS = $(patsubst $(SRC_DIR)/%.c,$(BUILD_DIR)/%.o,$(SOURCES))
|
OBJECTS = $(patsubst $(SRC_DIR)/%.c,$(BUILD_DIR)/%.o,$(SOURCES))
|
||||||
TEST_SOURCES = $(SRC_DIR)/logic.c $(SRC_DIR)/testLogic.c
|
TEST_SOURCES = $(SRC_DIR)/logic.c $(SRC_DIR)/testLogic.c
|
||||||
TEST_OBJECTS = $(patsubst $(SRC_DIR)/%.c,$(BUILD_DIR)/%.o,$(TEST_SOURCES))
|
TEST_OBJECTS = $(patsubst $(SRC_DIR)/%.c,$(BUILD_DIR)/%.o,$(TEST_SOURCES))
|
||||||
|
|
||||||
EXEC = productManager
|
EXEC = productManager
|
||||||
EXECTEST = test
|
EXECTEST = test
|
||||||
|
|
||||||
DEPS = $(OBJECTS:.o=.d)
|
DEPS = $(OBJECTS:.o=.d)
|
||||||
|
|
||||||
|
|
||||||
all: $(EXEC)
|
all: $(EXEC)
|
||||||
|
|
||||||
$(EXEC): $(OBJECTS)
|
$(EXEC): $(OBJECTS)
|
||||||
$(CC) $^ -o $@ $(LDLIBS)
|
$(CC) $^ -o $@ $(LDLIBS)
|
||||||
|
|
||||||
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c
|
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c
|
||||||
@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
-include $(DEPS)
|
-include $(DEPS)
|
||||||
|
|
||||||
|
|
||||||
test: $(TEST_OBJECTS)
|
test: $(TEST_OBJECTS)
|
||||||
$(CC) $^ -o $(EXECTEST) $(LDLIBS)
|
$(CC) $^ -o $(EXECTEST) $(LDLIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(BUILD_DIR) $(EXEC)
|
rm -rf $(BUILD_DIR) $(EXEC) $(EXECTEST)
|
||||||
|
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
@@ -13,6 +13,8 @@
|
|||||||
* TODO: Aggiungere copie venduto di prodotto a file
|
* TODO: Aggiungere copie venduto di prodotto a file
|
||||||
* TODO: Cambiare nome dei file con interagisce
|
* TODO: Cambiare nome dei file con interagisce
|
||||||
* TODO: Calcolare la somma delle entrate dati i file
|
* TODO: Calcolare la somma delle entrate dati i file
|
||||||
|
* TODO: Aggiungere la possibilità di aggiungere gli acquisti non compiuti con intenzioni di acquisto.
|
||||||
|
* e.g. persona vuole acquistare maglietta S ma non c'è la taglia
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *products;
|
char *products;
|
||||||
@@ -51,6 +53,7 @@ char* getProducts(const char *fname) {
|
|||||||
}
|
}
|
||||||
fclose(file);
|
fclose(file);
|
||||||
*/
|
*/
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int getCount(){
|
int getCount(){
|
||||||
|
|||||||
Reference in new issue
Block a user