File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed
NUB Admission Costing Calculator/database Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change 22
33CC = gcc
44CFLAGS = -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
2421clean :
25- rm -f $(TARGET1 ) $( TARGET2 )
22+ rm -f $(TARGETS )
You can’t perform that action at this time.
0 commit comments