Skip to content

Commit a02a91f

Browse files
committed
dead
1 parent 5cbc341 commit a02a91f

File tree

2 files changed

+20
-24
lines changed

2 files changed

+20
-24
lines changed

Makefile

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,28 @@
1-
# Compiler settings
1+
# Compiler
22
CXX = g++
3-
CXXFLAGS = -Wall -std=c++11
3+
CXXFLAGS = -Wall -std=c++17
44

5-
# Target executable name
6-
TARGET = program
5+
# Targets
6+
TARGETS = server client
77

8-
# Source files
9-
SOURCES = main.cpp
8+
# Build rules
9+
all: $(TARGETS)
1010

11-
# Object files
12-
OBJECTS = $(SOURCES:.cpp=.o)
11+
server: server.cpp
12+
$(CXX) $(CXXFLAGS) server.cpp -o server
1313

14-
# Default target
15-
all: $(TARGET)
14+
client: client.cpp
15+
$(CXX) $(CXXFLAGS) client.cpp -o client
1616

17-
# Link object files to create executable
18-
$(TARGET): $(OBJECTS)
19-
$(CXX) $(OBJECTS) -o $(TARGET)
20-
21-
# Compile source files to object files
22-
%.o: %.cpp
23-
$(CXX) $(CXXFLAGS) -c $< -o $@
24-
25-
# Clean up
17+
# Clean rule
2618
clean:
27-
rm -f $(OBJECTS) $(TARGET)
19+
rm -f $(TARGETS)
20+
21+
# Run server
22+
run-server: server
23+
./server
2824

29-
# Run the program
30-
run: $(TARGET)
31-
./$(TARGET)
25+
# Run client
26+
run-client: client
27+
./client
3228

33-
.PHONY: all clean run

main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ int main() {
66
std::cout << "Welcome to HackyDB!" << std::endl;
77
std::cout << "A lightweight database system developed" << std::endl;
88
std::cout << "by Team HACKY" << std::endl;
9+
std::cout << "deadline for the project is : 24/04/2025" << std::endl;
910
std::cout << std::endl;
1011

1112
// Print team member names

0 commit comments

Comments
 (0)