Skip to content

Commit 034bffd

Browse files
SQL makefile updated
1 parent 07e2836 commit 034bffd

File tree

1 file changed

+10
-13
lines changed
  • NUB Admission Costing Calculator/database

1 file changed

+10
-13
lines changed

NUB Admission Costing Calculator/database/Makefile

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,21 @@
22

33
CC = gcc
44
CFLAGS = -Wall
5-
LIBS = libsqlite3.a
5+
LIBS = ./libsqlite3.a
66

77
# Targets
8-
TARGET1 = sql
9-
TARGET2 = D_sql
8+
TARGETS = sql D_sql
109

11-
# Source files
12-
SRC1 = sql.c
13-
SRC2 = D_sql.c
10+
# Compile both programs
11+
all: $(TARGETS)
1412

15-
# Compile the first program
16-
$(TARGET1): $(SRC1)
17-
$(CC) $(CFLAGS) -o $(TARGET1) $(SRC1) $(LIBS)
13+
# Compile each target
14+
sql: sql.c
15+
$(CC) $(CFLAGS) -o $@ $< $(LIBS)
1816

19-
# Compile the second program
20-
$(TARGET2): $(SRC2)
21-
$(CC) $(CFLAGS) -o $(TARGET2) $(SRC2) $(LIBS)
17+
D_sql: D_sql.c
18+
$(CC) $(CFLAGS) -o $@ $< $(LIBS)
2219

2320
# Clean target to remove binaries
2421
clean:
25-
rm -f $(TARGET1) $(TARGET2)
22+
rm -f $(TARGETS)

0 commit comments

Comments
 (0)