Browse Source

[Pal/Linux-SGX] Makefile cleanup

Isaku Yamahata 4 years ago
parent
commit
215c00ab0c
1 changed files with 7 additions and 21 deletions
  1. 7 21
      Pal/src/host/Linux-SGX/Makefile

+ 7 - 21
Pal/src/host/Linux-SGX/Makefile

@@ -35,40 +35,26 @@ libpal-Linux-SGX.a: $(addsuffix .o,$(enclave-objs) $(enclave-asm-objs))
 	$(call cmd,ar_a_o)
 
 $(addsuffix .o,$(enclave-objs)): CFLAGS += -DIN_ENCLAVE
-$(addsuffix .o,$(enclave-objs)): %.o: %.c
-	$(call cmd,cc_o_c)
-
 $(addsuffix .i,$(enclave-objs)): CFLAGS += -DIN_ENCLAVE
-$(addsuffix .i,$(enclave-objs)): %.i: %.c
-	$(call cmd,cpp_i_c)
-
 $(addsuffix .s,$(enclave-objs)): CFLAGS += -DIN_ENCLAVE
-$(addsuffix .s,$(enclave-objs)): %.s: %.c
-	$(call cmd,cc_s_c)
-
 $(addsuffix .o,$(enclave-asm-objs)): ASFLAGS += -DIN_ENCLAVE
-$(addsuffix .o,$(enclave-asm-objs)): %.o: %.S
-	$(call cmd,as_o_S)
-
 $(addsuffix .s,$(enclave-asm-objs)): ASFLAGS += -DIN_ENCLAVE
-$(addsuffix .s,$(enclave-asm-objs)): %.s: %.S
-	$(call cmd,cpp_s_S)
 
-$(addsuffix .o,$(urts-objs)): %.o: %.c
+%.o: %.c
 	$(call cmd,cc_o_c)
 
-$(addsuffix .i,$(urts-objs)): %.i: %.c
+%.i: %.c
 	$(call cmd,cpp_i_c)
 
-$(addsuffix .s,$(urts-objs)): %.s: %.c
+%.s: %.c
 	$(call cmd,cc_s_c)
 
-$(addsuffix .s,$(urts-asm-objs)): %.s: %.S
-	$(call cmd,cpp_s_S)
-
-$(addsuffix .o,$(urts-asm-objs)): %.o: %.S
+%.o: %.S
 	$(call cmd,as_o_S)
 
+%.s: %.S
+	$(call cmd,cpp_s_S)
+
 pal-sgx: $(addsuffix .o,$(urts-objs) $(urts-asm-objs)) $(graphene_lib)
 	@echo [ host/Linux-SGX/$@ ]
 	@$(CC) $(CFLAGS) -Wl,-z,relro,-z,now -pie $^ -lc -pthread -o $@