Skip to content

Commit

Permalink
[Reti informatiche] Caricato progetto dello studente Giulio Zingrillo…
Browse files Browse the repository at this point in the history
… che ringraziamo per averci fornito il sorgente del suo progetto
  • Loading branch information
AndreaCovelli authored Jan 9, 2025
1 parent cb93c7c commit e81b212
Show file tree
Hide file tree
Showing 36 changed files with 1,655 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"files.associations": {
"cstdlib": "c",
"*.tcc": "c",
"memory": "c",
"new": "c",
"array": "c",
"string": "c",
"string_view": "c"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: gcc compila il file attivo",
"command": "/usr/bin/gcc",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Attività generata dal debugger."
}
],
"version": "2.0.0"
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Variabili
CC = gcc
CFLAGS = -Wall
LDFLAGS =

# File sorgente
SERVER_SOURCES = server.c modules/quiz.c modules/game.c modules/common.c modules/database.c modules/dashboard.c
CLIENT_SOURCES = client.c modules/common.c

# File oggetto
SERVER_OBJECTS = $(SERVER_SOURCES:.c=.o)
CLIENT_OBJECTS = $(CLIENT_SOURCES:.c=.o)

# Eseguibili
SERVER_EXECUTABLE = server
CLIENT_EXECUTABLE = client

# Regola per costruire tutto
all: $(SERVER_EXECUTABLE) $(CLIENT_EXECUTABLE)

# Regola per costruire il server
$(SERVER_EXECUTABLE): $(SERVER_OBJECTS)
$(CC) $(LDFLAGS) -o $@ $^

# Regola per costruire il client
$(CLIENT_EXECUTABLE): $(CLIENT_OBJECTS)
$(CC) $(LDFLAGS) -o $@ $^

# Regola per costruire i file oggetto
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<

# Regola per pulire i file generati
clean:
rm -f $(SERVER_OBJECTS) $(CLIENT_OBJECTS) $(SERVER_EXECUTABLE) $(CLIENT_EXECUTABLE)
Binary file not shown.
Loading

0 comments on commit e81b212

Please sign in to comment.