Skip to content

Commit

Permalink
(#146) Rework Makefile-rules to use auto-variables $@, $< more widely
Browse files Browse the repository at this point in the history
This commit refactors existing Makefile-rules to replace hard-coded
file-names (e.g. "certifier_proofs.cc") to instead use Make-provided
automatic variables (such as $@ and $<).

In a few places, use:
- '$(<D)' to name the directory of the 1st pre-requisite
- '$(@d)' to name the directory of the target

With this change, much of the rules become more compact and follow
a pattern consistent with Make-suggested usage of variables.

Refactor few mak-files to define common_objs list; remove redundant
definitions of CFLAGS and other unused symbols / make-rules.
  • Loading branch information
gapisback committed Jul 10, 2023
1 parent e0b2fd8 commit 70c266c
Show file tree
Hide file tree
Showing 16 changed files with 520 additions and 527 deletions.
107 changes: 55 additions & 52 deletions application_service/app_service.mak
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ I= $(SRC_DIR)/include
INCLUDE= -I$(I) -I$(LIBSRC)/sev-snp -I/usr/local/opt/[email protected]/include/

CFLAGS=$(INCLUDE) -O3 -g -Wall -std=c++11 -Wno-unused-variable -D X64 -D DEBUG -Wno-deprecated-declarations
CFLAGS1=$(INCLUDE) -O1 -g -Wall -std=c++11 -Wno-unused-variable -D X64 -D DEBUG -Wno-deprecated-declarations
CC=g++
LINK=g++
# PROTO=/usr/local/bin/protoc
Expand All @@ -44,13 +43,18 @@ AR=ar
#export LD_LIBRARY_PATH=/usr/local/lib
LDFLAGS= -L $(LOCAL_LIB) -lprotobuf -lgtest -lgflags -lpthread -L/usr/local/opt/[email protected]/lib/ -lcrypto -lssl

dobj= $(O)/app_service.o $(O)/certifier.pb.o $(O)/certifier.o $(O)/certifier_proofs.o $(O)/support.o \
$(O)/simulated_enclave.o $(O)/application_enclave.o $(O)/cc_helpers.o $(O)/cc_useful.o \
$(O)/sev_support.o $(O)/sev_report.o
dobj = $(O)/app_service.o $(O)/certifier.pb.o $(O)/certifier.o \
$(O)/certifier_proofs.o $(O)/support.o $(O)/simulated_enclave.o \
$(O)/application_enclave.o $(O)/cc_helpers.o $(O)/cc_useful.o \
$(O)/sev_support.o $(O)/sev_report.o

user_dobj= $(O)/test_user.o $(O)/certifier.pb.o $(O)/certifier.o $(O)/certifier_proofs.o $(O)/support.o \
$(O)/simulated_enclave.o $(O)/application_enclave.o $(O)/cc_helpers.o $(O)/cc_useful.o
user_dobj = $(O)/test_user.o $(O)/certifier.pb.o $(O)/certifier.o \
$(O)/certifier_proofs.o $(O)/support.o $(O)/simulated_enclave.o \
$(O)/application_enclave.o $(O)/cc_helpers.o $(O)/cc_useful.o

send_req_dobj = $(O)/send_request.o $(O)/certifier.pb.o $(O)/certifier.o \
$(O)/support.o $(O)/application_enclave.o \
$(O)/simulated_enclave.o $(O)/certifier_proofs.o

all: app_service.exe hello_world.exe send_request.exe test_user.exe

Expand All @@ -62,83 +66,82 @@ clean:
@echo "removing executable file"
rm -rf $(EXE_DIR)/app_service.exe

hello_world.exe: hello_world.cc
@echo "hello_world.cc"
$(CC) $(CFLAGS) -o $(O)/hello_world.exe $(S)/hello_world.cc
hello_world.exe: $(S)/hello_world.cc
@echo "compiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

send_request.exe: $(O)/send_request.o $(O)/certifier.pb.o $(O)/certifier.o $(O)/support.o $(O)/application_enclave.o $(O)/simulated_enclave.o $(O)/certifier_proofs.o
@echo "send_request.exe"
$(LINK) -o $(EXE_DIR)/send_request.exe $(O)/send_request.o $(O)/certifier.pb.o \
$(O)/certifier.o $(O)/certifier_proofs.o $(O)/support.o $(O)/application_enclave.o $(O)/simulated_enclave.o $(LDFLAGS)
$(EXE_DIR)/send_request.exe: $(send_req_dobj)
@echo "linking executable $@"
$(LINK) $(send_req_dobj) $(LDFLAGS) -o $(@D)/$@

$(O)/send_request.o: $(S)/send_request.cc
@echo "send_request.cc"
$(CC) $(CFLAGS) -c -o $(O)/send_request.o $(S)/send_request.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

app_service.exe: $(dobj)
@echo "linking executable files"
$(LINK) -o $(EXE_DIR)/app_service.exe $(dobj) $(LDFLAGS)
$(EXE_DIR)/app_service.exe: $(dobj)
@echo "linking executable $@"
$(LINK) $(dobj) $(LDFLAGS) -o $(@D)/$@

test_user.exe: $(user_dobj)
@echo "linking executable files"
$(LINK) -o $(EXE_DIR)/test_user.exe $(user_dobj) $(LDFLAGS)
$(EXE_DIR)/test_user.exe: $(user_dobj)
@echo "linking executable $@"
$(LINK) $(user_dobj) $(LDFLAGS) -o $(@D)/$@

$(I)/certifier.pb.h: $(US)/certifier.pb.cc
$(US)/certifier.pb.cc: $(CP)/certifier.proto
$(PROTO) --proto_path=$(CP) --cpp_out=$(US) $<
mv certifier.pb.h $(I)
$(PROTO) --proto_path=$(<D) --cpp_out=$(@D) $<
mv $(@D)/certifier.pb.h $(I)

$(O)/app_service.o: $(S)/app_service.cc $(S)/certifier.pb.cc
@echo "compiling app_service.cc"
$(CC) $(CFLAGS) -c -o $(O)/app_service.o $(S)/app_service.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/certifier.pb.o: $(US)/certifier.pb.cc $(I)/certifier.pb.h
@echo "compiling certifier.pb.cc"
$(CC) $(CFLAGS) -c -o $(O)/certifier.pb.o $(US)/certifier.pb.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/certifier.o: $(LIBSRC)/certifier.cc $(I)/certifier.pb.h $(I)/certifier.h
@echo "compiling certifier.cc"
$(CC) $(CFLAGS) -c -o $(O)/certifier.o $(LIBSRC)/certifier.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/certifier_proofs.o: $(LIBSRC)/certifier_proofs.cc $(I)/certifier.pb.h $(I)/certifier.h
@echo "compiling certifier_proofs.cc"
$(CC) $(CFLAGS) -c -o $(O)/certifier_proofs.o $(LIBSRC)/certifier_proofs.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/support.o: $(LIBSRC)/support.cc $(I)/support.h
@echo "compiling support.cc"
$(CC) $(CFLAGS) -c -o $(O)/support.o $(LIBSRC)/support.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/cc_helpers.o: $(LIBSRC)/cc_helpers.cc $(I)/cc_helpers.h
@echo "compiling cc_helpers.cc"
$(CC) $(CFLAGS) -c -o $(O)/cc_helpers.o $(LIBSRC)/cc_helpers.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/cc_useful.o: $(LIBSRC)/cc_useful.cc $(I)/cc_useful.h
@echo "compiling cc_useful.cc"
$(CC) $(CFLAGS) -c -o $(O)/cc_useful.o $(LIBSRC)/cc_useful.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/simulated_enclave.o: $(LIBSRC)/simulated_enclave.cc $(I)/simulated_enclave.h
@echo "compiling simulated_enclave.cc"
$(CC) $(CFLAGS) -c -o $(O)/simulated_enclave.o $(LIBSRC)/simulated_enclave.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/application_enclave.o: $(LIBSRC)/application_enclave.cc $(I)/application_enclave.h
@echo "compiling application_enclave.cc"
$(CC) $(CFLAGS) -c -o $(O)/application_enclave.o $(LIBSRC)/application_enclave.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/test_user.o: $(S)/test_user.cc $(S)/certifier.pb.cc
@echo "compiling test_user.cc"
$(CC) $(CFLAGS) -c -o $(O)/test_user.o $(S)/test_user.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

SEV_S=$(LIBSRC)/sev-snp

$(O)/sev_support.o: $(SEV_S)/sev_support.cc \
$(I)/certifier.h $(I)/support.h $(SEV_S)/attestation.h $(SEV_S)/sev_guest.h \
$(SEV_S)/snp_derive_key.h
@echo "compiling sev_support.cc"
$(CC) $(CFLAGS) -c -o $(O)/sev_support.o $(SEV_S)/sev_support.cc
$(I)/certifier.h $(I)/support.h \
$(SEV_S)/attestation.h $(SEV_S)/sev_guest.h \
$(SEV_S)/snp_derive_key.h
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/sev_report.o: $(SEV_S)/sev_report.cc \
$(I)/certifier.h $(I)/support.h $(SEV_S)/attestation.h $(SEV_S)/sev_guest.h \
$(SEV_S)/snp_derive_key.h
@echo "compiling sev_report.cc"
$(CC) $(CFLAGS) -c -o $(O)/sev_report.o $(SEV_S)/sev_report.cc

$(I)/certifier.h $(I)/support.h $(SEV_S)/attestation.h \
$(SEV_S)/sev_guest.h $(SEV_S)/snp_derive_key.h
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<
2 changes: 1 addition & 1 deletion openenclave_test/enclave/oe_certifier.mak
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ clean:
rm -rf $(EXE_DIR)/oe_certifier.exe

oe_certifier.exe: $(dobj)
@echo "linking executable files"
@echo "linking executable $@"
$(LINK) -o $(EXE_DIR)/oe_certifier.exe $(dobj) $(LDFLAGS)

certifier.pb.cc certifier.pb.h: $(S)/certifier.proto
Expand Down
2 changes: 1 addition & 1 deletion sample_apps/analytics_example/enclave/oe_certifier.mak
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ clean:
rm -rf $(EXE_DIR)/oe_certifier.exe

oe_certifier.exe: $(dobj)
@echo "linking executable files"
@echo "linking executable $@"
$(LINK) -o $(EXE_DIR)/oe_certifier.exe $(dobj) $(LDFLAGS)

certifier.pb.h: certifier.pb.cc
Expand Down
68 changes: 34 additions & 34 deletions sample_apps/simple_app/example_app.mak
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ LDFLAGS= -L $(LOCAL_LIB) -lprotobuf -lgtest -lgflags -lpthread -L/usr/local/opt/

# Note: You can omit all the files below in d_obj except $(O)/example_app.o,
# if you link in the certifier library certifier.a.
dobj= $(O)/example_app.o $(O)/certifier.pb.o $(O)/certifier.o $(O)/certifier_proofs.o \
$(O)/support.o $(O)/simulated_enclave.o $(O)/application_enclave.o $(O)/cc_helpers.o \
$(O)/cc_useful.o
robj= $(O)/example_key_rotation.o $(O)/certifier.pb.o $(O)/certifier.o $(O)/certifier_proofs.o \
$(O)/support.o $(O)/simulated_enclave.o $(O)/application_enclave.o $(O)/cc_helpers.o \
$(O)/cc_useful.o
dobj = $(O)/example_app.o $(O)/certifier.pb.o $(O)/certifier.o $(O)/certifier_proofs.o \
$(O)/support.o $(O)/simulated_enclave.o $(O)/application_enclave.o $(O)/cc_helpers.o \
$(O)/cc_useful.o

robj = $(O)/example_key_rotation.o $(O)/certifier.pb.o $(O)/certifier.o $(O)/certifier_proofs.o \
$(O)/support.o $(O)/simulated_enclave.o $(O)/application_enclave.o $(O)/cc_helpers.o \
$(O)/cc_useful.o

all: example_app.exe example_key_rotation.exe
clean:
Expand All @@ -61,55 +61,55 @@ clean:
@echo "removing executable file"
rm -rf $(EXE_DIR)/example_app.exe

example_app.exe: $(dobj)
@echo "linking executable files"
$(LINK) -o $(EXE_DIR)/example_app.exe $(dobj) $(LDFLAGS)
$(EXE_DIR)/example_app.exe: $(dobj)
@echo "\nlinking executable $@"
$(LINK) $(dobj) $(LDFLAGS) -o $(@D)/$@

example_key_rotation.exe: $(robj)
@echo "linking executable files"
$(LINK) -o $(EXE_DIR)/example_key_rotation.exe $(robj) $(LDFLAGS)
$(EXE_DIR)/example_key_rotation.exe: $(robj)
@echo "\nlinking executable $@"
$(LINK) $(robj) $(LDFLAGS) -o $(@D)/$@

$(I)/certifier.pb.h: $(US)/certifier.pb.cc
$(US)/certifier.pb.cc: $(CP)/certifier.proto
$(PROTO) --proto_path=$(CP) --cpp_out=$(US) $<
mv $(US)/certifier.pb.h $(I)
$(PROTO) --proto_path=$(<D) --cpp_out=$(@D) $<
mv $(@D)/certifier.pb.h $(I)

$(O)/certifier.pb.o: $(US)/certifier.pb.cc $(I)/certifier.pb.h
@echo "compiling certifier.pb.cc"
$(CC) $(CFLAGS_NOERROR) -c -o $(O)/certifier.pb.o $(US)/certifier.pb.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS_NOERROR) -o $(@D)/$@ -c $<

$(O)/example_app.o: $(US)/example_app.cc $(I)/certifier.h $(US)/certifier.pb.cc
@echo "compiling example_app.cc"
$(CC) $(CFLAGS) -c -o $(O)/example_app.o $(US)/example_app.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/example_key_rotation.o: $(US)/example_key_rotation.cc $(I)/certifier.h $(US)/certifier.pb.cc
@echo "compiling example_app.cc"
$(CC) $(CFLAGS) -c -o $(O)/example_key_rotation.o $(US)/example_key_rotation.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/certifier.o: $(S)/certifier.cc $(I)/certifier.pb.h $(I)/certifier.h
@echo "compiling certifier.cc"
$(CC) $(CFLAGS) -c -o $(O)/certifier.o $(S)/certifier.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/certifier_proofs.o: $(S)/certifier_proofs.cc $(I)/certifier.pb.h $(I)/certifier.h
@echo "compiling certifier_proofs.cc"
$(CC) $(CFLAGS) -c -o $(O)/certifier_proofs.o $(S)/certifier_proofs.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/support.o: $(S)/support.cc $(I)/support.h
@echo "compiling support.cc"
$(CC) $(CFLAGS) -c -o $(O)/support.o $(S)/support.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/simulated_enclave.o: $(S)/simulated_enclave.cc $(I)/simulated_enclave.h
@echo "compiling simulated_enclave.cc"
$(CC) $(CFLAGS) -c -o $(O)/simulated_enclave.o $(S)/simulated_enclave.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/application_enclave.o: $(S)/application_enclave.cc $(I)/application_enclave.h
@echo "compiling application_enclave.cc"
$(CC) $(CFLAGS) -c -o $(O)/application_enclave.o $(S)/application_enclave.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/cc_helpers.o: $(S)/cc_helpers.cc $(I)/certifier.h $(US)/certifier.pb.cc
@echo "compiling cc_helpers.cc"
$(CC) $(CFLAGS) -c -o $(O)/cc_helpers.o $(S)/cc_helpers.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/cc_useful.o: $(S)/cc_useful.cc $(I)/cc_useful.h
@echo "compiling cc_useful.cc"
$(CC) $(CFLAGS) -c -o $(O)/cc_useful.o $(S)/cc_useful.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<
69 changes: 34 additions & 35 deletions sample_apps/simple_app_under_app_service/example_app.mak
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ I= $(SRC_DIR)/include
INCLUDE= -I$(I) -I/usr/local/opt/[email protected]/include/ -I$(S)/sev-snp/

CFLAGS=$(INCLUDE) -O3 -g -Wall -std=c++11 -Wno-unused-variable -D X64 -Wno-deprecated-declarations
CFLAGS1=$(INCLUDE) -O1 -g -Wall -std=c++11 -Wno-unused-variable -D X64 -Wno-deprecated-declarations
CC=g++
LINK=g++
#PROTO=/usr/local/bin/protoc
Expand All @@ -43,12 +42,13 @@ LDFLAGS= -L $(LOCAL_LIB) -lprotobuf -lgtest -lgflags -lpthread -L/usr/local/opt/

# Note: You can omit all the files below in d_obj except $(O)/example_app.o,
# if you link in the certifier library certifier.a.
dobj= $(O)/service_example_app.o $(O)/certifier.pb.o $(O)/certifier.o $(O)/certifier_proofs.o \
$(O)/support.o $(O)/simulated_enclave.o $(O)/application_enclave.o $(O)/cc_helpers.o $(O)/cc_useful.o

sp_dobj=$(O)/start_program.o $(O)/certifier.pb.o $(O)/certifier.o $(O)/certifier_proofs.o $(O)/support.o \
$(O)/simulated_enclave.o $(O)/application_enclave.o $(O)/cc_helpers.o $(O)/cc_useful.o
dobj = $(O)/service_example_app.o $(O)/certifier.pb.o $(O)/certifier.o \
$(O)/certifier_proofs.o $(O)/support.o $(O)/simulated_enclave.o \
$(O)/application_enclave.o $(O)/cc_helpers.o $(O)/cc_useful.o

sp_dobj = $(O)/start_program.o $(O)/certifier.pb.o $(O)/certifier.o \
$(O)/certifier_proofs.o $(O)/support.o $(O)/simulated_enclave.o \
$(O)/application_enclave.o $(O)/cc_helpers.o $(O)/cc_useful.o

all: service_example_app.exe start_program.exe
clean:
Expand All @@ -59,56 +59,55 @@ clean:
@echo "removing executable file"
rm -rf $(EXE_DIR)/service_example_app.exe

service_example_app.exe: $(dobj)
@echo "linking executable files"
$(LINK) -o $(EXE_DIR)/service_example_app.exe $(dobj) $(LDFLAGS)
$(EXE_DIR)/service_example_app.exe: $(dobj)
@echo "\nlinking executable $@"
$(LINK) $(dobj) $(LDFLAGS) -o $(@D)/$@

$(I)/certifier.pb.h: $(US)/certifier.pb.cc
$(US)/certifier.pb.cc: $(CP)/certifier.proto
$(PROTO) --proto_path=$(CP) --cpp_out=$(US) $<
mv $(US)/certifier.pb.h $(I)
$(PROTO) --proto_path=$(<D) --cpp_out=$(@D) $<
mv $(@D)/certifier.pb.h $(I)

$(O)/certifier.pb.o: $(US)/certifier.pb.cc $(I)/certifier.pb.h
@echo "compiling certifier.pb.cc"
$(CC) $(CFLAGS) -c -o $(O)/certifier.pb.o $(US)/certifier.pb.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

start_program.exe: $(sp_dobj)
@echo "start_program.exe"
$(LINK) -o $(EXE_DIR)/start_program.exe $(sp_dobj) $(LDFLAGS)
$(EXE_DIR)/start_program.exe: $(sp_dobj)
@echo "\nlinking executable $@"
$(LINK) $(sp_dobj) $(LDFLAGS) -o $(@D)/$@

$(O)/start_program.o: start_program.cc
@echo "start_program.cc"
$(CC) $(CFLAGS) -c -o $(O)/start_program.o $(US)/start_program.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/service_example_app.o: $(US)/service_example_app.cc $(I)/certifier.h $(US)/certifier.pb.cc
@echo "compiling service_example_app.cc"
$(CC) $(CFLAGS) -c -o $(O)/service_example_app.o $(US)/service_example_app.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/certifier.o: $(S)/certifier.cc $(I)/certifier.pb.h $(I)/certifier.h
@echo "compiling certifier.cc"
$(CC) $(CFLAGS) -c -o $(O)/certifier.o $(S)/certifier.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/certifier_proofs.o: $(S)/certifier_proofs.cc $(I)/certifier.pb.h $(I)/certifier.h
@echo "compiling certifier_proofs.cc"
$(CC) $(CFLAGS) -c -o $(O)/certifier_proofs.o $(S)/certifier_proofs.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/support.o: $(S)/support.cc $(I)/support.h
@echo "compiling support.cc"
$(CC) $(CFLAGS) -c -o $(O)/support.o $(S)/support.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/simulated_enclave.o: $(S)/simulated_enclave.cc $(I)/simulated_enclave.h
@echo "compiling simulated_enclave.cc"
$(CC) $(CFLAGS) -c -o $(O)/simulated_enclave.o $(S)/simulated_enclave.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/application_enclave.o: $(S)/application_enclave.cc $(I)/application_enclave.h
@echo "compiling application_enclave.cc"
$(CC) $(CFLAGS) -c -o $(O)/application_enclave.o $(S)/application_enclave.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/cc_helpers.o: $(S)/cc_helpers.cc $(I)/certifier.h $(US)/certifier.pb.cc
@echo "compiling cc_helpers.cc"
$(CC) $(CFLAGS) -c -o $(O)/cc_helpers.o $(S)/cc_helpers.cc
@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<

$(O)/cc_useful.o: $(S)/cc_useful.cc $(I)/cc_useful.h
@echo "compiling cc_useful.cc"
$(CC) $(CFLAGS) -c -o $(O)/cc_useful.o $(S)/cc_useful.cc

@echo "\ncompiling $<"
$(CC) $(CFLAGS) -o $(@D)/$@ -c $<
Loading

0 comments on commit 70c266c

Please sign in to comment.