Skip to content

Commit

Permalink
Merge pull request #132 from kentkost/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mouse07410 authored Sep 1, 2023
2 parents 208d9ed + b2273e1 commit 75cc775
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
5 changes: 1 addition & 4 deletions examples/sample.source.MHEG5/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -455,10 +455,7 @@ all: InterchangedObject.c $(TARGET)
$(TARGET): ${OBJS}
$(CC) $(CFLAGS) -o $(TARGET) ${OBJS} $(LDFLAGS) $(LIBS)

.SUFFIXES:
.SUFFIXES: .c .o

.c.o:
%.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<

clean:
Expand Down
32 changes: 15 additions & 17 deletions libasn1compiler/asn1c_save.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,23 +266,21 @@ asn1c__save_example_mk_makefile(arg_t *arg, const asn1c_dep_chainset *deps,
}
}

safe_fprintf(
mkf,
"\n\nall: $(ASN_PROGRAM)\n"
"\n$(ASN_PROGRAM): $(ASN_LIBRARY) $(ASN_PROGRAM_SRCS:.c=.o)"
"\n\t$(CC) $(CFLAGS) $(CPPFLAGS) -o $(ASN_PROGRAM) "
"$(ASN_PROGRAM_SRCS:.c=.o) $(LDFLAGS) $(ASN_LIBRARY) $(LIBS)\n"
"\n$(ASN_LIBRARY): $(ASN_MODULE_SRCS:.c=.o)"
"\n\t$(AR) rcs $@ $(ASN_MODULE_SRCS:.c=.o)\n"
"\n.SUFFIXES:"
"\n.SUFFIXES: .c .o\n"
"\n.c.o:"
"\n\t$(CC) $(CFLAGS) -o $@ -c $<\n"
"\nclean:"
"\n\trm -f $(ASN_PROGRAM) $(ASN_LIBRARY)"
"\n\trm -f $(ASN_MODULE_SRCS:.c=.o) $(ASN_PROGRAM_SRCS:.c=.o)\n"
"\nregen: regenerate-from-asn1-source\n"
"\nregenerate-from-asn1-source:\n\t");
safe_fprintf(
mkf,
"\n\nall: $(ASN_PROGRAM)\n"
"\n$(ASN_PROGRAM): $(ASN_LIBRARY) $(ASN_PROGRAM_SRCS:.c=.o)"
"\n\t$(CC) $(CFLAGS) $(CPPFLAGS) -o $(ASN_PROGRAM) "
"$(ASN_PROGRAM_SRCS:.c=.o) $(LDFLAGS) $(ASN_LIBRARY) $(LIBS)\n"
"\n$(ASN_LIBRARY): $(ASN_MODULE_SRCS:.c=.o)"
"\n\t$(AR) rcs $@ $(ASN_MODULE_SRCS:.c=.o)\n"
"\n%%.o: %%.c"
"\n\t$(CC) $(CFLAGS) -o $@ -c $<\n"
"\nclean:"
"\n\trm -f $(ASN_PROGRAM) $(ASN_LIBRARY)"
"\n\trm -f $(ASN_MODULE_SRCS:.c=.o) $(ASN_PROGRAM_SRCS:.c=.o)\n"
"\nregen: regenerate-from-asn1-source\n"
"\nregenerate-from-asn1-source:\n\t");

for(int i = 0; i < argc; i++) {
safe_fprintf(mkf, "%s%s", i ? " " : "", argv[i]);
Expand Down

0 comments on commit 75cc775

Please sign in to comment.